There is no BM internal way for what you want, most likely to prevent people messing with it (and because even in a managed system, Engines or SoftwareSystems are notified when something isn't needed anymore ... what you want is a GC ontop of a GC ... sort of not such a good idea as double management will bring up some kind of problem earlier or later but at least for sure)
But there is the unofficial way, thought it is, as always, risky to use and might change at any time:
But there is the unofficial way, thought it is, as always, risky to use and might change at any time:
Type Test Field c:Int End Type Global t:Test = New test Print "RefCount: " + Byte Ptr(t)[-4] Local l:Tlist = New tlist For Local i:Int = 1 To 10 l.addlast(t) Next Print "RefCount: " + Byte Ptr(t)[-4]