Help, my memory is slowly slipping away..

BlitzMax Forums/BlitzMax Beginners Area/Help, my memory is slowly slipping away..

If you use:

Local file:TStream=OpenFile()

The garbage collector will recognize when it exits the method that an object reference has gone out of scope.

Because you are using an integer handle instead, a call to Release is required as the garbage collector can not relate the integer variable going out of scope having any relevance to the reference count on the file object.