solutionModel.removeForm

I’m writing something that makes heavy use of solutionModel.cloneForm.

During the process I keep a list of all the forms I’ve created, s that when it’s done I can remove them.

I loop through my array and do both

history.removeForm(formName)
solutionModel.removeForm(formName);

However, if I go back later and try and clone a form and use a previously used name (one that as far as I understand it, should have been removed from memory at this point) I get an error saying a form of this name already exists.

Furthermore If I look in my Window menu or form list from the Window menu, I can see all the forms I’ve created quite clearly there.

Am I doing it wrong?

(edit)
I have found a way around name collisions by never recycling names, so thats not the issue, 'm just worried about run away memory usage by having all these throw away forms laying around.

what is the boolean value that removeForm returns?
is that false? then the form wasnt removed, most likely because it was used (running a method) or visible on screen.

Good question…it’s possible I hadn’t removed it from view yet.
I’ll check my order of events and report back.