Hi Franklin,
> When I removed the container all items ,the view should be destroyed
Actually not. You can do both: either remove a control (or View) from its parent or destroy it. Removing removes the DOM and the entire parent-child relationship is deleted, but the control itself is still alive as a JavaScript entity which could be added to the DOM or another parent later.
This is useful when you have applications with lots of content which you do not want to keep in DOM, but still you want to avoid the overhead of creating these controls again and again. Or if a re-usable control is used in many different places.
Destroying removes the DOM AND deletes the JS entity (frees it for garbage collection). This is really recommended to avoid memory leaks in applications which are typically running for a longer period of time. And for Controls/Views which are rather unlikely to be displayed again.
All you would need to do to really destroy a child, is:
child.destroy();
This also removes the Control/View from its parent.
And the ID is then also free for re-use.
Regards
Andreas