Hi Charlie,
First of all, is the RemoveObject necessary? Does the form not release properly if RemoveObject is not called? Often objects added with AddObject will be destroyed properly by their containers without any intervention.
Sometimes order of destruction is important when releasing objects. Ed Leafe ran into this when creating ebizobj: if he didnt release the dataenvironment objects in a particular order, GPFs abounded. Maybe try removing the object later (in another method/event).
Rick
>Hi:
>
>Getting a C5 error when I release a form. On this form, there are container objects(pgfs) being added(addobject()) and removed(removeobject()) during runtime. Everything works fine until you release the form. I thought it might be a dangling object reference, but looking in the debugger I see the object references are being released. If I comment out the removeobject(), everything is fine again. It seems the removeobject is screwing something up and I can't figure out what it is.
>
>Thanx,
>Charlie