ilnaz Posted June 2, 2020 Share Posted June 2, 2020 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 Link to comment
FileEX Posted June 2, 2020 Share Posted June 2, 2020 Use dxCreateTexture instead of image path, and use destroyElement when do you want remove image from memory Link to comment
Administrators Lpsd Posted June 2, 2020 Administrators Share Posted June 2, 2020 @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. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now