Memory access error:

Hello, Can anyone with sufficient knowledge give me an answer,
When a function returns a pointer to data, like "GetHostByName";
At which moment the memory of that data is released? Do I have to free it after using the data(delete PointerX) ? because thats what I did but sometimes an memory access error exception occurs.
Thank you in advance.
Always check the documentation of the function in question:
http://msdn.microsoft.com/en-us/library/ms738524%28v=vs.85%29.aspx
Thank you!
Topic archived. No new replies allowed.