mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
fix an observer leak on InputControl
This commit is contained in:
@@ -41,9 +41,13 @@ public class GuiInput extends MyObservable implements Observer {
|
|||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public GuiInput() {
|
public GuiInput() {
|
||||||
|
AllZone.getInputControl().deleteObservers();
|
||||||
AllZone.getInputControl().addObserver(this);
|
AllZone.getInputControl().addObserver(this);
|
||||||
|
|
||||||
AllZone.getStack().addObserver(this);
|
AllZone.getStack().addObserver(this);
|
||||||
AllZone.getPhase().addObserver(this);
|
AllZone.getPhase().addObserver(this);
|
||||||
|
|
||||||
|
//System.out.println("Stack observers: " + AllZone.getStack().countObservers());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
|
|||||||
Reference in New Issue
Block a user