ilnaz Posted June 2, 2020 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
FileEX Posted June 2, 2020 Posted June 2, 2020 Use dxCreateTexture instead of image path, and use destroyElement when do you want remove image from memory
MTA Team Lpsd Posted June 2, 2020 MTA Team 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.
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