Mathias,
See my other reply to Larry for some additional details.
This does look like a bug, there are no external object references to your form, but there appears to be a dangling
internal one. There is nothing you can do short of a CLEAR ALL (which is rather destructive to your app) to get rid of it.
I believe you can work around this by using a manager for your collection and explicitly call o.Remove() to removing your collection's references to the form prior to calling the form.Release() method.
You should report this to
http://support.microsoft.com/default.aspx?scid=/Support/vfoxpro/report/report.asp>thanks for your reply. It seems not to be true to me that an object _only_ releases if all references to it are deleted. Just try :
>
>o = CREATEOBJ('Collection')
>o2 = CREATEOBJ('_Form')
>o.Add(o2,'OneAndOnly') && only once
>o2.Release()
>
>You will see that the collection is empty and gbIamHere is gone. This should imho also be the case if there are 2 references stored in the collection.