Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

IImage *img;
IImageCtl *imageCtl;

IIMAGECTL_SetImage(imageCtl,img);

Does this function(IIMAGECTL_SetImage) internally copy the image (img)?
I ask this question because i want to release the image(img) but after that to redraw the IMAGECTL (imageCtl)

No, it just assigns the pointer and does an AddRef() - you can release the IImage after assigning, but that would just decrement the reference count.

No, it just assigns the pointer and does an AddRef() - you can release the IImage after assigning, but that would just decrement the reference count.

IImage *pImage;
SomeFunc(...)
{
// load bmp
pImage = ISHELL_LoadImage(pIShell, "test.bmp");
IIMAGECTL_SetImage(pImageCtl, pImage);
// release
IIMAGE_Release(pImage);

You needn't call IIMAGE_Release(pImage) in the AppFreeData function.

IImage *pImage;
SomeFunc(...)
{
// load bmp
pImage = ISHELL_LoadImage(pIShell, "test.bmp");
IIMAGECTL_SetImage(pImageCtl, pImage);
// release
IIMAGE_Release(pImage);

You needn't call IIMAGE_Release(pImage) in the AppFreeData function.