Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Category:
Coding, syntax & commands
> One question: Am I correct in assuming that if I set oGuard = .NULL.
> rather than issue return it should also close the appropriate file?
Yes, setting the variable to .NULL. will kill the object and thus trigger its DESTROY method which closes the file. This also works if the guard object is part of another object and the containing object is destroyed.
The code in my post was just a minimalistic example, though. There are several enhancements that make it more practical, like a method that releases the handle from the guardian's care - in case you want to suspend the death sentence for the handle ;-) - or an _ASSIGN method for the handle that closes the currently stored handle before stuffing the new value in.
Have fun!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only