libidn: Memory handling under Windows

1 
1 2.6 Memory handling under Windows
1 =================================
1 
1 Several functions in the library allocates memory.  The memory is
1 expected to be de-allocated using the ‘free’ function.  Under Windows,
1 it is sometimes necessary to de-allocate memory in the same module that
1 allocated a memory region.  The reason is that different modules use
1 separate heap memory regions.  To solve this problem we provide a
1 function to de-allocate memory inside the library.
1 
1    Note that we do not recommend using this interface generally if you
1 do not care about Windows portability.
1 
1 2.7 Header file ‘idn-free.h’
1 ============================
1 
1 To use the function explained in this chapter, you need to include the
1 file ‘idn-free.h’ using:
1 
1      #include <idn-free.h>
1 
1 2.8 Memory de-allocation function
1 =================================
1 
1 idn_free
1 --------
1 
1  -- Function: void idn_free (void * PTR)
1      PTR: memory region to deallocate, or ‘NULL’ .
1 
1      Deallocates memory region by calling ‘free()’ .  If ‘ptr’ is ‘NULL’
1      no operation is performed.
1 
1      Normally applications de-allocate strings allocated by libidn by
1      calling ‘free()’ directly.  Under Windows, different parts of the
1      same application may use different heap memory, and then it is
1      important to deallocate memory allocated within the same module
1      that allocated it.  This function makes that possible.
1