Skip to content
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

go.set memory leak #8884

Open
hippocoder opened this issue May 4, 2024 · 0 comments
Open

go.set memory leak #8884

hippocoder opened this issue May 4, 2024 · 0 comments
Labels
bug Something is not working as expected engine Issues related to the Defold engine

Comments

@hippocoder
Copy link

hippocoder commented May 4, 2024

Is it a private platform, and a platform specific issue? (i.e. would it break your NDA?)

Then please report your issue in the corresponding extension repository!

Describe the bug (REQUIRED)
An immediate mode drawing API was created for an ingame editor. Each frame I clear a list of gameobject ids, then use a factory to create them again in different locations with different positions, tints and scales.

function M.Clear()
	for i = #Points, 1, -1 do
		go.delete(Points[i])
		table.remove(Points, i)
	end
end

function M.Point(_pos, _scale, _col)	
	local id = factory.create("#PointFactory", _pos, nil, nil, _scale)
	Points[#Points+1] = id

	local sprite = msg.url(nil, id, "sprite")
	--go.set(sprite, "tint", _col) <-------------------uncommenting this will cause memory to rise continually. nothing else
end

To Reproduce (REQUIRED)
Steps to reproduce the behavior:
use profiler for factory create but tint them each time

Expected behavior (REQUIRED)
no increasing allocations over time

Defold version (REQUIRED):
1.8.0

Platforms (REQUIRED):
Windows 11

@hippocoder hippocoder added the bug Something is not working as expected label May 4, 2024
@britzl britzl added the engine Issues related to the Defold engine label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected engine Issues related to the Defold engine
Projects
None yet
Development

No branches or pull requests

2 participants