memory leak with files
BlitzMax Forums/BlitzMax Programming/memory leak with files same problem here
WinXPSp2
WinXPSp2
Graphics 640,480,0 While Not KeyHit(KEY_ESCAPE) If KeyHit(KEY_SPACE) file = ReadFile("test.map") CloseFile file Release file EndIf Cls DrawText MemAlloced(),0,0 FlushMem Flip Wend Endor
Graphics 640,480,0 While Not KeyHit(KEY_ESCAPE) If KeyHit(KEY_SPACE) file:TStream = ReadFile("test.map") CloseFile file EndIf Cls DrawText MemAlloced(),0,0 FlushMem Flip Wend End
or file:TFile = ReadFile("test.map")
Shouldn't CloseFile do an implicit Release?
Edit: Oh, sorry, no it shouldn't.
Edit: Oh, sorry, no it shouldn't.
Thanks for clearing up that silly little bug everyone! My mistake.
*headshot*