summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level-0
diff options
context:
space:
mode:
Diffstat (limited to 'starts/meaning-vm/level-0')
-rw-r--r--starts/meaning-vm/level-0/memorystore.cpp13
-rw-r--r--starts/meaning-vm/level-0/memorystore.hpp1
2 files changed, 7 insertions, 7 deletions
diff --git a/starts/meaning-vm/level-0/memorystore.cpp b/starts/meaning-vm/level-0/memorystore.cpp
index 220d0c3..edb75b1 100644
--- a/starts/meaning-vm/level-0/memorystore.cpp
+++ b/starts/meaning-vm/level-0/memorystore.cpp
@@ -17,10 +17,10 @@ static auto & index()
namespace concepts {
- ref allocator() { static ref ret = basic_alloc(); return ret; };
- ref allocates() { static ref ret = basic_alloc(); return ret; };
- ref allocations() { static ref ret = basic_alloc(); return ret; };
- ref level0allocations() { static ref ret = basic_alloc(); return ret; };
+ ref allocator() { static ref ret = basic_alloc(); return ret; }
+ ref allocates() { static ref ret = basic_alloc(); return ret; }
+ ref allocations() { static ref ret = basic_alloc(); return ret; }
+ ref level0allocations() { static ref ret = basic_alloc(); return ret; }
}
struct init { init()
@@ -117,8 +117,9 @@ void dealloc_from(ref source)
}
try {
for (auto allocation : ours ) {
- if (allocation.linked(concepts::allocates())) {
- dealloc_from(allocation);
+ for (auto suballocation : allocation.getAll(concepts::allocates())) {
+ // check for this link to find subgroups
+ throw still_referenced_by(allocation, suballocation);
}
}
for (auto ghost : ours) {
diff --git a/starts/meaning-vm/level-0/memorystore.hpp b/starts/meaning-vm/level-0/memorystore.hpp
index f4faa13..55723b2 100644
--- a/starts/meaning-vm/level-0/memorystore.hpp
+++ b/starts/meaning-vm/level-0/memorystore.hpp
@@ -44,7 +44,6 @@ void basic_dealloc(ref allocated);
ref alloc(ref allocator, std::any data = {}); // new concept
void alloc(ref allocated, ref allocator); // extra ownership for concept
void realloc(ref allocated, ref allocator); // move ownership for concept to allocator
-[[deprecated("can make recursion: turn to workable habits")]]
void dealloc(ref allocated, ref allocator); // remove ownership for concept
std::size_t allocated();