Commit 899a4cbc authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #752 from rudi-c/leakfix

Release leftover chunk in the TraceStack.
parents 8728a053 2716db6a
......@@ -120,6 +120,13 @@ public:
push(p);
}
}
~TraceStack() {
RELEASE_ASSERT(end - cur == CHUNK_SIZE, "destroying non-empty TraceStack");
// We always have a block available in case we want to push items onto the TraceStack,
// but that chunk needs to be released after use to avoid a memory leak.
release_chunk(start);
}
void push(void* p) {
GC_TRACE_LOG("Pushing %p\n", p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment