tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/108-destroy-singleton-created-by-injectorRobotlegs: Discussion 2018-10-18T16:35:10Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/12806312010-03-22T13:43:04Z2010-03-22T13:43:04ZDestroy singleton created by injector?<div><p>Hi Matan,</p>
<p>you can use injector.unmap to remove the singleton.
Unfortunately,<br>
that doesn't work in SwiftSuspenders 1.0, which is bundled with<br>
Robotlegs 1.0, so in order to really free the singleton
instance,<br>
you'll have to use either the current beta of SwiftSuspenders
1.5<br>
(<a href=
"http://github.com/tschneidereit/SwiftSuspenders/downloads">http://github.com/tschneidereit/SwiftSuspenders/downloads</a>)
or another DI solution like SmartyPants or Spring.</p>
<p>If you want to use the SwiftSuspenders beta, simply dropping the
SWC<br>
into your libs folder should enable it.</p></div>Till Schneidereittag:robotlegs.tenderapp.com,2009-10-18:Comment/12806312010-03-22T13:49:29Z2010-03-22T13:49:31ZDestroy singleton created by injector?<div><p>Thanks, but I'm cool with version 1 at the moment, luckily the
model only keeps a "selectedIndex". I added a "reset" function to
reset the index. Only asked because I saw the functionality is
missing.</p></div>Matan Uberstein