Thanks for that and sorry for the late reply - our new spam filter chopped out your response email for some reason.
>James,
>
>Yes, when objects have been composited at designtime, or via AddObject() at runtime, the destruction of the contained objects happens automatically. There is also the benefit in that "generic" methods can be written to use this.parent to go outwards and use the Objects[] collection to go inwards. This is very handy to broadcast method calls or property sets.
>
>If you use object references with Create/NewObject() calls then you should explicitly null those references out during the destruct sequence.
>
>>Am I correct in thinking that a major advantage of the containership method is that, when the parent container is destroyed, all of the contained objects will be destroyed and your garbage collection is taken care of ? This is as opposed to having object references created with CREATEOBJECT/NEWOBJECT ?
>>
>>I currently use the later method and have to make sure that I destroy referenced objects so that (a) they are destroyed and (b) VFP gets the counter down to 0 for the class and releases the memory associated with it.
>>
>>I'm thinking that I should have been using AddObject() all along ...
Cheers,
Jamie