tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/741-force-mediator-to-recreate-the-view-instanceRobotlegs: Discussion 2013-02-28T05:28:56Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/252580452013-02-24T12:43:25Z2013-02-24T12:43:25ZForce mediator to recreate the view instance<div><p>Hmmm... Normally the mediator is only instantiated AFTER the
view is added to the stage, so the view must exist first. But this
behaviour can be overridden. Care to explain what you're trying to
achieve exactly?</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/252580452013-02-27T02:19:41Z2013-02-27T02:19:42ZForce mediator to recreate the view instance<div><p>I'm using 'navigator-as3' with robotlegs and it seems that the
non-current views are not being removed from the memory. I'm trying
to figure who to blame, hehe.</p>
<p>Do you have any idea on how to accomplish such thing?</p>
<p>Thanks.</p></div>Rafael Rinalditag:robotlegs.tenderapp.com,2009-10-18:Comment/252580452013-02-27T21:50:50Z2013-02-27T21:50:50ZForce mediator to recreate the view instance<div><p>Mediators are normally destroyed and released when a view leaves
the stage. They are garbage collected when the player runs low on
memory.</p>
<p>When an old view is added to the stage a second time, a new
mediator is created.</p>
<p>Perhaps navigator-as3 is keeping references to the views, and
hence keeping them pinned in memory?</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/252580452013-02-27T23:15:59Z2013-02-27T23:15:59ZForce mediator to recreate the view instance<div><p>Yup, the problem is within navigator-as3. Here is the best
workaround I've found so far: <a href=
"">https://github.com/epologee/navigator-as3/issues/8</a> (last
comment)</p>
<p>It works though I don't like the approach.</p>
<p>Thanks for your time anyway, guys.</p></div>Rafael Rinalditag:robotlegs.tenderapp.com,2009-10-18:Comment/252580452013-02-27T23:22:58Z2013-02-27T23:22:58ZForce mediator to recreate the view instance<div><p>No probs. Sorry we couldn't be more useful. Best of luck.</p>
<p>I'm closing this issue for now. Please re-open, or open a new
one, if you experience further issues.</p></div>Shaun Smith