Skip to content

Commit d7ba0c4

Browse files
committed
Merge pull request #2 from igor3k/patch-1
Update Model.java
2 parents dff9400 + ec2f1ae commit d7ba0c4

File tree

1 file changed

+7
-2
lines changed
  • src/org/puremvc/java/multicore/core/model

1 file changed

+7
-2
lines changed

src/org/puremvc/java/multicore/core/model/Model.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,13 @@ public void registerProxy(IProxy proxy) {
119119
* @param proxy
120120
* name of the <code>Proxy</code> instance to be removed.
121121
*/
122-
public IProxy removeProxy(String proxy) {
123-
return (IProxy) this.proxyMap.remove(proxy);
122+
public IProxy removeProxy(String proxyName) {
123+
IProxy proxy = (IProxy) this.proxyMap.get(proxyName);
124+
if(proxy != null){
125+
this.proxyMap.remove(proxyName);
126+
proxy.onRemove();
127+
}
128+
return proxy;
124129
}
125130

126131
/**

0 commit comments

Comments
 (0)