Am 13.02.2014 15:40, schrieb marti.ma...@littlecms.com:
> Quoting Kai-Uwe Behrmann <k...@gmx.de>:

>> cmsGetContextUserData() can be used to obtain a referenced object and
>> release it upon lcms handle destroy. But how can one get the passed in
>> cmsContext before calling e.g. cmsCloseProfile().
>>
>> My function sequence is essentially:
>> id = cmsCreateContext(NULL, my_object)
>> profile = cmsOpenProfileFromMemTHR(id,...)
>> // other code parts inbetween
>> // How to get the my_object back to unref or free?
>> cmsCloseProfile(profile)
>
>
> You could use cmsGetProfileContext() or cmsGetTransformContext(),

Oh I missed that, and this is even a elder API member. Thanks for
pointing out.

> Example:
> my_object = cmsGetUserData(cmsGetProfileContext(profile));

Works fine and keeps code simple.

kind regards
Kai-Uwe

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to