|
Re: Do I need to close a FileStream?: msg#00143lang.smalltalk.squeak.beginners
On Mar 24, 2007, at 8:34 , Tim Johnson wrote: Hi, Yes. Always. A common pattern is f := ... open the file stream .... [ ... do something with f ... ] ensure: [f close] This ensures f is closed even if there is an error in your processing code. What happens if I don't? Bad Things ;) I'm not exactly sure. How can I tell if I have lots of open files in my system? "FileStream allInstances inspect"? You would need to use #allSubInstances and check if they're open. - Bert -
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Do I need to close a FileStream?, Tim Johnson |
|---|---|
| Next by Date: | Re: Do I need to close a FileStream?, Kyle Hamilton |
| Previous by Thread: | Do I need to close a FileStream?, Tim Johnson |
| Next by Thread: | Re: Do I need to close a FileStream?, Kyle Hamilton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |