Possible Duplicate:
Smart pointers/safe memory management for C?
I have an embedded application where I am allocating an object in dynamic memory and passing it around to other modules.
I would like to create a smart pointer to this object. There are many examples in C++ for using and implementing smart pointers.
I am looking for a C language only implementation of a smart pointer.
Thanks.