Nov. 3, 2012
2:23 a.m.
I am refereshing my familiarity with streams by looking at PharoByExample1 which says... "You have to remember that each time you open a stream on a ï¬le, you have to close it too." Does that mean if in Workspace I iteratively develop some code to process a stream, so that I am continually running... myStream := FileStream readOnlyFileNamed: 'C:\test.txt. ...so that 'myStream' is overwritten each time such that I lose reference to the previous stream, and I am no longer able to send #close to it, am I creating a memory leak in my image ? My prior assumption has been that once 'myStream' drops the reference drops to the previous stream, garbage collection would take care of 'everything'. cheers -ben