On 11/19/06, Charles <[EMAIL PROTECTED]> wrote:
> For example, there are many win32 api
> functions that takes a struct pointer as an argument. The struct must
> have been dynamically allocated in the api function, but I have never
> seen any instruction to free the struct returned when we no longer
> need the struct.

No. In Win32 you usually pass in the address of an auto variable of a
struct, the functions do not allocate the memory for them.
There are exceptions (like strdup), but usually you need to pass in an
already allocated chunk of memory that the library function will work
on.

-- 
Tamas Marki - http://tmarki.on.panonnet.net

Reply via email to