>I would not objct at all if, in their adoption of this, the VFP Team did as you suggest and permit a way to release a memvar without releaseing the referenced object. As long as we could also definitely release the object when we say so.
Jim,
Just as a devil's advocate question, what would you do if you released a memvar and that caused an object to be released that something else was depending on because its referencing variable was not yet released?
To me this really sounds like a violation of encapsulation. If routine A creates an object and then passes a reference to it to routine B, then routine B should NOT be able to blow away routine A's object. However, routine B should be able to do anything it wants to its own memvar without concern about any effects on routine A.
If routine B has to concern itself with whether or not routine A still needs the object then there is a violation of encapsulation because B needs to know what A is up to and B can blow A away.
There is also tight external coupling because B must have intimate knowledge of A in order to not blow A away and A must have intimate knowledge of B in order to protect itself from being blown away.