[fdo-users] Memory management and FdoPtr

Snehal Joshi snehal.joshi at gmail.com
Fri May 11 12:03:08 EDT 2012


Hi All,

I just started using FDO libraries, and have a question regarding memory
management in FDO. I am confused about when to use FdoPtr and
FDO_SAFE_ADDREF/FDO_SAFE_RELEASE.

Based on the information in the Developer's Guide, my understanding is that
FdoPtr will take care of incrementing the reference count/release the
object (provided the class implementes FdoIDisposable) - however, it'll
call Release() as soon as the FdoPtr goes out of scope. So, within a
function I write, if I wrap the return values of one of the FDO create/get
methods in an FdoPtr, and return that FdoPtr as a function return value,
it's a bad idea. Is that a valid assumption?

Thanks,
Snehal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20120511/b72f5385/attachment.html


More information about the fdo-users mailing list