# solutionModel.removeForm

**URL:** <https://forum.servoy.com/t/solutionmodel-removeform/12644>\
**Category:** Classic Servoy\
**Created:** [August 13, 2010, 4:34pm UTC](https://forum.servoy.com/t/solutionmodel-removeform/12644 "2010-08-13T16:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgarfield](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jgarfield](https://forum.servoy.com/u/jgarfield)\
**Post date:** [August 13, 2010, 4:34pm UTC](https://forum.servoy.com/t/solutionmodel-removeform/12644/1 "2010-08-13T16:34:21Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [August 16, 2010, 11:28am UTC](https://forum.servoy.com/t/solutionmodel-removeform/12644/2 "2010-08-16T11:28:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jgarfield](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jgarfield](https://forum.servoy.com/u/jgarfield)\
**Post date:** [August 16, 2010, 2:30pm UTC](https://forum.servoy.com/t/solutionmodel-removeform/12644/3 "2010-08-16T14:30:56Z")

</div>

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