rttrorg / rttr

C++ Reflection Library
https://www.rttr.org
MIT License
3.12k stars 430 forks source link

Custom behaviour when freeing object #285

Closed berggrenmille closed 4 years ago

berggrenmille commented 4 years ago

Can I somehow work around the fact that the deletion of variant also calls delete for the wrapped object. I have made it so the object gets allocated by a custom allocator, and I don't want the memory to be freed. Someone got a 500 iq idea?

berggrenmille commented 4 years ago

According to the source code it only seems to delete if wrapped value is a pointer. Gonna get back with you after some testing.