New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
destructor and constructor not work #10
Comments
I‘m saying that although I use the |
I'm going to need more information than this to assist. |
Ah, sorry that isn't clear. Realistically, the safest way to approach allocations using the library is to use the tag/pool allocators objects or a container to achieve the same goal. You can achieve the same result with a unique smart pointer: auto a = jxy::make_unique<A, NonPagedPool, '0GAT'>(); This also gives you the convenience of RAII cleaning up the resource when it leaves scope. Further, if you wish to detach the memory from the smart pointer then re-attach it later, these are the mechanics: auto rawPointer = a.release();
// some place/time later...
jxy::unique_ptr<A, NonPagedPool, '0GAT'> resource;
resource.reset(rawPointer); Finally, I'll leave this here if you must choose to use auto a = new (NonPagedPool, '0GAT') A();
jxy::default_delete<A, NonPagedPool, '0GAT'>()(a); |
Thanks for your help |
As the title described, the destructor and constructor function do not work. You can write a print in the destructor and constructor function to test.
The text was updated successfully, but these errors were encountered: