Custom asset memory bug


I’ve created my own custom asset. It stores a variable from a custom struct, named FOctree (which I use for octrees).
This struct has a pointer, which points to heap-allocated int32 array (and another variable to store the elem count).

When I import the asset, everything works fine. But as soon as I play the game in editor, the heap-allocated data gets zeroed. I mean, all the data falls back to -842150451.

I didn’t use TArrays because they make the editor crash when importing data.

Any ideas?
Thanks !