-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak if define class name and use it inside the same script #31378
Comments
CC @bojidar-bg @vnen |
Usage of declared class name for method arguments or return type inside the same class also leads to this issue:
|
Same happens with Godot 3.2 latest build 3bd49da under Windows 10 - 64 bit |
I noticed the same issue. It also happens with internal classes that reference themselves. extends Reference
class MyClass:
func test() -> MyClass: # Leak
return null |
Going to close this as a duplicate of #27136, in an attempt to cut down on the amount of GDScript circular reference issues open. |
Godot version:
3.1.1
OS/device including version:
Windows 10 - 64 bit
Issue description:
If define script with class_name <CLASS_NAME> and use this CLASS_NAME as static type then error "ObjectDB Instances still exist!" appears after closing of a game
Steps to reproduce:
Create new project
Create scene with one node
Attach script below to node:
Export scene and run with -v flag.
Close the project
The following errors can be found in the console:
If this is not allowed it would be nice if IDE at least prints error and doesn't allow to compile such code.
Minimal reproduction project:
MemoryLeak.zip
The text was updated successfully, but these errors were encountered: