Skip to content

Commit

Permalink
Try one more idea..
Browse files Browse the repository at this point in the history
  • Loading branch information
VeithMetro authored Oct 10, 2024
1 parent 96df136 commit 82a74fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/core/Proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,18 @@ namespace Thunder {
Space = reinterpret_cast<uint8_t*>(::malloc(alignedSize));
}

return Space;
return reinterpret_cast<void*>(Space);
}
// Somehow Purify gets lost if we do not delete it, overide the delete operator
void
operator delete(
void* stAllocateBlock)
{
uint8_t* originalPtr = reinterpret_cast<uint8_t*>(stAllocateBlock) - sizeof(void*);
reinterpret_cast<ProxyObject<CONTEXT>*>(originalPtr)->__Destructed();
::free(originalPtr);
if (stAllocateBlock != nullptr) {
uint8_t* originalPtr = reinterpret_cast<uint8_t*>(stAllocateBlock) - sizeof(void*);
reinterpret_cast<ProxyObject<CONTEXT>*>(originalPtr)->__Destructed();
::free(originalPtr);
}
}

public:
Expand Down

0 comments on commit 82a74fe

Please sign in to comment.