Skip to content

Commit ec2f1ae

Browse files
author
ibb
committed
Update Model.java
Fixing bug where proxy onRemove not being called when proxy removed
1 parent dff9400 commit ec2f1ae

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)