Question
Destroying a CFC object
I'm new to CF OO, so apologies if this is dumb question.
How do I destroy an object that has been made persistant by giving it application scope?
Researching this I've found two things:
- It's been suggested that I can set the object to Null using:
<cfset objFoo = JavaCast( "null", 0 ) />
This does seem to work but all the ColdFusion help documents say you should do this and it will cause unexpected results?
- In other languages objects often have a finalizer method that can be called to destroy them, but I can't find a common approach to this in CF OO?
How do I destroy an object that has been made persistant by giving it application scope?
Researching this I've found two things:
- It's been suggested that I can set the object to Null using:
<cfset objFoo = JavaCast( "null", 0 ) />
This does seem to work but all the ColdFusion help documents say you should do this and it will cause unexpected results?
- In other languages objects often have a finalizer method that can be called to destroy them, but I can't find a common approach to this in CF OO?
