Thank you for the very fast response, worked perfectly!
I guess I should have read the docs a little more carefully.

On Thu, Sep 28, 2017 at 10:52 AM, Larry Gritz <[email protected]> wrote:

> Yes!
>
> ImageCache* globalcache = ImageCache::create ();  // by default, returns
> the shared one
> globalcache->attribute ("max_memory_MB", 1000);
>
> Because this is the global shared cache, there's no need to free or clean
> up that pointer you got from IC::create().
>
>
>
> On Sep 28, 2017, at 10:38 AM, Yegor Swarovski <[email protected]> wrote:
>
> Hey! Just getting started out with using OpenImageIO, I see this in the
> documentation for the ImageBuf:
>
> If imagecache is non-NULL, the custom ImageCache will be used (if
> applicable); otherwise, a NULL imagecache indicates that the global/shared
> ImageCache should be used.
>
>
>
> Is there a way to change the max memory of the global ImageCache? I see
> you can do it with ImageCaches you've created:
>
>
> ImageCache *cache = ImageCache::create ();
> cache->attribute ("max_memory_MB", 500.0);
>
>
> But I'm not sure if/how I can gain access to the global ImageCache.
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
> --
> Larry Gritz
> [email protected]
>
>
>
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to