eugeneloza / decoherence

Project moved to https://gitlab.com/EugeneLoza/decoherence
GNU General Public License v3.0
10 stars 7 forks source link

Memory overuse in LoadImage #416

Closed eugeneloza closed 6 years ago

eugeneloza commented 6 years ago

When image is loaded into DImage scaled, the unscaled version of image remains! Should be disposed of and removed from AutoFree. I don't think any image would be loaded twice? So source image may be disposed of immediately?

  1. Must be disposed when loading by-URL.
eugeneloza commented 6 years ago
FreeFromTrash(AImage)
AutoFree.Delete(AImage);
//AImage.Free
eugeneloza commented 6 years ago

ImageLoad(... AutoFree: boolean = true): TCastleImage; and free it manually after "load-by-URL" in case of rescaling (pass another variable? - bad idea).