Comments (5)
Hello there. I was expecting objects would be freed automatically on exit_tree(). Or is it just an UndoRedo thing? Also, would there be any difference if I added it in the Main.gd script instead of Global.gd?
from pixelorama.
All nodes and objects needs to be freed at the end of life.
Only references(child of Reference node like ImageTexture or BoxShape) are counted and are deleted when no one use it.
Nodes should be deleted with queue_free() and objects with free().
You can check which objects and nodes leaks when you opening godot with verbose flag in terminal godot -v
or in monitors inside Godot editor(this only show leaked nodes)
Description of exit_tree function from docs - https://docs.godotengine.org/en/latest/classes/class_node.html#class-node-method-exit-tree
Called when the node is about to leave the SceneTree (e.g. upon freeing, scene changing, or after calling remove_child in a script). If the node has children, its _exit_tree callback will be called last, after all its children have left the tree.
That means, that node is out of scene, but it can be deleted or in any moment node can back to scene
from pixelorama.
Also when I paint something then also Image node is leaking
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:2069.
Leaked instance: UndoRedo:2088
Leaked instance: Image:2135 - Resource name: Path:
Orphan StringName: UndoRedo
Orphan StringName: Image
StringName: 2 unclaimed string names at exit.
To get more precise info about node, you can set unique name to all node(I will create issue in Godot repository to automate this)
e.g.
var image : Image.new()
image.name = "Image-Tanks.gd"
from pixelorama.
I implemented your fix for the UndoRedo leak in a4b7fe2. I'm not sure how to handle the Image node leaking though. I tried running godot -v in terminal, and run the project, but I didn't get any "Leaked instance" messages. I'm using Godot 3.1.2
from pixelorama.
In Pixelorama master branch I can't reproduce leak in Godot 3.1.2 and Godot 3.2 beta 3, so probably the latest commit fixes also this leak.
from pixelorama.
Related Issues (20)
- The undo/redo system consumes a lot of RAM HOT 4
- CRITICAL DATA LOSS: Re-ordering tabs then saving renames files and overwrites without confirmation HOT 3
- `Bucket` tool to replace color (multiple frames), chance to mass up with wrong color
- [AUR] Broken UI HOT 3
- Pixelorama crash after trying rotate selection or image HOT 11
- Shading Tool breaks Undo functionality HOT 2
- Setting Tool Shortcut To Use Control Doesn't Work HOT 1
- Top of window blurry on MacOS Retina Display HOT 2
- Blend modes not working on all GPUs and performance issues
- Program can sometimes crash when resizing images HOT 1
- version 0.11.3 reset custom brush when switch another tool HOT 2
- Pixelorama Crashes when run from the Godot Editor HOT 2
- Export to SVG HOT 4
- Tar.gz inside zip HOT 4
- File won't open either save! HOT 5
- My project doesn't want to load HOT 7
- When saving project for the first time (or Save as...), other .pxo files are not shown in the selected folder HOT 1
- Last pixel of drawn line (under cursor) is not represented in preview, giving the impression that line will be shorter
- the cursor have not transparency HOT 1
- Color picker in Top color mode selects fully transparent pixel from top layer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixelorama.