Skip to content

Bug: all kind of array(Array, PoolByteArray, PoolStringArray ...) Memory leak when pass to GdNative #318

@zhangshiqian1214

Description

@zhangshiqian1214

Godot version:
Godot 3.1.1.stable.official and Godot v3.1.2.devel.custom_build

OS/device including version:
Windows7

Issue description:
Only create a lot of array in GDscript, the memory can be freed.
Only create a lot of array in GDNative(cpp), the memory can be freed.
But create a lot of array and PoolByteArray, PoolStringArray and so on, the memory can not be freed. And If the memory used more than device, the project will memory leak and crash.

QQ截图20190805160317

For now I use something like this:

# test array
func _on_Button2_pressed():
	for i in range(10000):
		var data = []
		for j in range(1024):
			data.push_back(j)
		test.test_array(data)
	pass # Replace with function body.

The project I tested
gdnative_test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions