Jump to content

It reduces memory ! HELP FIX BUG


ilnaz

Recommended Posts

Posted

dxDrawImage reduces memory!

I used the image drawing function and checked when memory is decreasing.

setTimer(function()
	local st = dxGetStatus()
	local m1 = st.VideoMemoryFreeForMTA
	if not c or c ~= m1 then
		print(m1)
		c = m1
	end
end,10,0)

When using dxDrawImage in sizes larger than 1024x1024 this is especially noticeable. Memory crashes but with a new load. How can this be avoided so that an unused image is deleted from memory.

Sorry for bad English :D

Posted

Use dxCreateTexture instead of image path, and use destroyElement when do you want remove image from memory

  • MTA Team
Posted

@ilnaz You haven't posted any examples of how you're using dxDrawImage in your script, so it's really hard to advise you.

Please post code examples.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...