[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: RE: OpenLDAP & Howes/Smith Programming LDAP book...



At 12:04 PM 7/3/00 -0500, Randy Kunkee wrote:
>Pay very careful attention to the documentation and when you need to
>free the memory.
>
>The original Umich3.3 code, for example, did not provide ldap_memfree
>at all, and in my client code I added a
>        #define ldap_memfree(p) free(p)
>
>I still do this for OpenLDAP 1.2.x.  It there is a prototype
>defined for ldap_memfree in ldap.h, but there it is not used by any
>of the code (hmmmm... Kurt?).

This is for the WIN32 SDK port (which actually did work at one point) which
needs a special deallocator to ensure the underlying free acts upon
the appropriate heap.

The OpenLDAP 1.x UNIX port has never provided this function.

In 2.0, ldap_memfree() and friends will always be provided and should be
used to free dynamically allocated data elements provided by the SDK.

As previously noted, there are other (and very subtle) differences
between U-Mich/OpenLDAP 1.x/RFC 1823 and other APIs...

        Kurt