>Hi!
>
>Let say, goRefMgr is a public variable holding the object responsible for managing cross-references in your applicatiosn. When you release certain object that you know could be referenced elsewhere in your application, in the Destroy event of that object call goRefMgr.GoingToDestroy(this), for example. As you see, you pass a reference to method. In the method:
>
>
>lparameters poObject
>...
>for i=1 to alen(this.aReferences,1)
> if poObject = this.aReferences[i]
> this.aReferences[i] = ''
> adel(...)
> endif
>endfor
>
>
>I also do not know if ASCAN will work for object references, but you can try.
>
>Without generic approach and some kind of concept related to objects referencing you will get a lot of situations when form or certain object do not release from memory, and it will be hard to figure out all places with such references. Doing referencing through some kind of centralized tool (references manager) will h elp you to track all of them.
>
>HTH.
>
>>>Hi!
>>>
>>>No. Just before releasing object you have to clear these references. So you require to establish both way referencing - when you hold object reference, that object should know about that for case it is gonna to destroy self and know what to clear. Well, you can use public variables for that, but this is not a good thing. Better use some sort of manager object that will hold a collection of object references. You can than find your object in that collection by simple compare of references - object references are correctly comparable in VFP.
>>
>>Vlad
>>
>>Sorry for sounding a bit thick here, but how can I compare the object references in the manager?
>>
>>Kev
Vlad
If I had a Main toolbar that fired of functions in various forms, would the RefMgr be used then?
Thanks
Kev