Open cbing66 opened 3 months ago
Post scriptum: In unique_ptr.h, Line 36, I fixed it this way, to avoid a compile error (VS2022):
assert(this->get() != nullptr);
The memory block was not freed because allocator of the main thread is buffering memory of the one page. This allocator is destroyed after the collector thread ends. I will fix this.
I wrote a small test to start using the library. To test for memory leaks, I added a helper class that uses the functions in VS2022. From the output view it looks like there are blocks of memory not deallocated:
I did some step-by-step checking and in some cases the deallocation functions are not called (e.g.{169} -> block->page_count == Block::PageCount is not checked and consequently the deletion to the next line is skipped). Am I doing something wrong? Is this a VisualStudio-specific problem?
My code: