The Verse GarbageCollector does not work properly.
Steps to Reproduce
hello_world_device := class(creative_device):
OnBegin<override>()<suspends>:void=
Multiplier:=100000
var I: int = 0
loop:
if (I>1000):
break
Print("Reached {I*Multiplier}")
var J: int = 0
loop:
if (J>=Multiplier):
break
One:=test_class{}
set J+=1
Sleep(0.0)
set I += 1
Expected Result
Verse should see that those objects arenât referenced anywhere. It should clear those up.
Observed Result
LogVerse: Error: VerseRuntimeErrors: Ran out of memory for allocating UObjects while attempting to construct a Verse object: test_class!
This bug report isnât related to var I: int or var J: int at all. The issue is that the test_class{} instances remain in memory even tho i leave their scope several times.