Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2008 Server
>>
>>Parameter objects are passed by reference. The temptation is for Child.Init() to simply store that reference somewhere (because that's easy), then use that to access the passed properties. If at some point the original parameter object disappears, but after that the child needs to access its properties via the stored reference, what happens then?
>>
>>Yes, this can be avoided by the child storing the individual parameter object properties, at which point the object reference can be discarded. But that takes extra work and isn't obvious.
>>
>
>An object will not be released as long as at least one reference to it exists. Storing reference to the parameter object in a property of the child form guaranteed that it'll be available as long as form exists.
That is not correct. You can explicitely destroy objects, such a forms, or objects in collections, which will set any reference to NULL
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