potential fix for yoga memory bug
This commit is contained in:
parent
2fd6618ff0
commit
23ea3442f3
@ -170,10 +170,14 @@ public class Window implements DrawableElement, ContainerElement, NavigableEleme
|
||||
* Destroys the element
|
||||
*/
|
||||
public void destroy(){
|
||||
this.yogaNode = Element.NULL_YOGA_ELEMENT;
|
||||
for(Element el : getChildren()){
|
||||
Globals.signalSystem.post(SignalType.YOGA_DESTROY, el);
|
||||
}
|
||||
this.clearChildren();
|
||||
if(this.yogaNode != Element.NULL_YOGA_ELEMENT){
|
||||
Yoga.YGNodeFree(this.yogaNode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user