Quantcast
Viewing all articles
Browse latest Browse all 40524

Question about memory consumption in oF

What is weird though is that 2 copies of each image results in more than 2 times the memory. If I do this:

for (int i = 0; i < dir.size(); i++){
    images.push_back(ofImage());
ofLoadImage(images[i], dir.getPath(i));
}

The memory goes through the roof (up to about 1.8GB before it crashes). But if I do this:

for (int i = 0; i < dir.size(); i++){
    textures.push_back(ofTexture());
    ofLoadImage(textures[i], dir.getPath(i));
}

The memory sticks at less than 200MB and it all works perfectly.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>