Garbage Collection of Arrays

Post » Tue Sep 22, 2015 6:02 pm

In the "http://www.creationkit.com/Arrays_%28Papyrus%29#Assigning.2FPassing_Arrays" page of the Creation Kit Wiki it says:

Are un-referenced arrays indeed immediately garbage collected?

I'm just asking because - in a situation where an array has to be reset repeatedly - I was pondering if it wouldn't be more memory friendly to reuse the array and set all entries to 'None' instead of simply re-initializing it.

My thoughts (not sure though):

If garbage collection is fast then re-initializing will not waste memory and will be fast.

If garbage collection is slow then resetting array-entries to 'None' might save memory but may be slower.

Does anyone have knowledge about Papyrus' garbage collection in this regard?

User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Return to V - Skyrim