On Monday, 25 January 2021 at 15:46:15 UTC, frame wrote:
On Monday, 25 January 2021 at 14:34:23 UTC, vitamin wrote:
Is the object returned from dll GC allocated?
The object is created on the default way. No alternating
allocation. Before the object is returned it's added to
GC.addRoot() which should be enough but may I'm wrong. I also
tried to add each object that holds the string member with
GC.addRoot().
If created on the default way mean allocated with new (=> GC)
then I don't known where is problem, but if the object is
allocated with other way, for example malloc, some allocator then
you need tell GC about that object with GC.addRange.