A Native Collection has not been disposed...

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

A Native Collection has not been disposed...

Post by DunnyOfPenwick »

I am running 0.14.5 in the editor and sometimes get several hundred 'A Native Collection has not been disposed, resulting in a memory leak...' messages.

I am able to duplicate under the following conditions:
Save a game while inside a building.
Load the save you just created.
Exit the game.

The DaggerfallBillboardBatch.OnDestroy() method does not get called on exit in this case.
Can anyone confirm?

User avatar
numidium3rd
Posts: 187
Joined: Sun Mar 25, 2018 12:34 am
Location: United States

Re: A Native Collection has not been disposed...

Post by numidium3rd »

I vaguely recall seeing a message like that in the editor but I was preoccupied working on something else so I didn't follow up on it. Since you're seeing the message too it sounds like it could be an issue. Although, since it's happening on exit then the memory should get freed by the OS when the process ends so the memory leak shouldn't become a problem. I'll try tracking that down later today when I'm off work.

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: A Native Collection has not been disposed...

Post by Interkarma »

Cheers, I've notified Andrew on PR #2436 to take a look when they can.

Post Reply