Skip to content

Custom type Ref<T> leaks #215

@bruvzg

Description

@bruvzg

Ref of custom type T leaks if it is created from gdnative module.

Ref<A> a;
a.instance(); //leaks

Ref of Godot type T is freed correctly.

Ref<File> f;
f.instance(); //ok

Custom type instances created from gdscript are freed correctly as well.

var a = load('res://a.gdns').new() #ok

Update:
As a workaround I'm currently using a = Ref<A>::__internal_constructor(A::_new()); instead of a.instance which seems to work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis has been identified as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions