Futurescale, Inc.
PureMVC Home
The PureMVC Framework
Code at the Speed of Thought
Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
New discussions should be taken up in issues on the appropriate projects at
https://github.com/PureMVC
PureMVC Architects Lounge
PureMVC Manifold
Port to AS3
MultiCore Version
Pipes Utility - Disconnecting Pipes
Pages:
1
[
2
]
« previous
next »
Author
Topic: Pipes Utility - Disconnecting Pipes (Read 30882 times)
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: Pipes Utility - Disconnecting Pipes
«
Reply #15 on:
August 07, 2008, 05:20:29 »
Yes, assuming the pipe to the shell was working before the mediator was removed, it should still work afterwards. The junction still exists, you've merely removed the mediator from the View in the module, so it can no longer be notified.
-=Cliff>
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: Pipes Utility - Disconnecting Pipes
«
Reply #16 on:
August 07, 2008, 05:52:28 »
Also, you don't have to break the pipeline apart and dispose of each fitting separately for them to be GC'd.
Due to the way Flash does garbage collection (reference counting + mark & sweep), you can simply remove the pipes leading to or from the module in question, do a removeCore on the module's facade, then unload the module. QED.
In the simplest of bidirectional cases, the ShellJunctionMediator has an output pipe leading to the module and an input pipe coming from the module.
So. inside the ShellJunctionMediator, remove both of those pipes. Now you have a module, with pipes sticking out of it connected to nothing, floating in memory with no outside references from the main app. Call facade.removeCore passing the multitonKey of the module. Then unload the module. Then call for GC.
-=Cliff>
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: Pipes Utility - Disconnecting Pipes
«
Reply #17 on:
October 02, 2008, 05:50:54 »
@riafan:
http://forums.puremvc.org/index.php?topic=508.msg2165#msg2165
I added the disconnectFitting method as you described, and added a unit test. The latest version of pipes is 1.1
-=Cliff>
Logged
Pages:
1
[
2
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...