Determining when functions allocate memory in C++ -


so 1 major problem have determining whether given function in c/c++ memory allocation or not. work external libraries, of have functions return pointers new objects. there basic design paradigm or convention let me know ahead of time if allocates memory?

it seem function returns pointer new object must allocating memory, not seem case. example, fopen not

edit: clear, don't have access source code can't check if uses new or malloc, ect.

read documentation of libraries use. should tell if things should freed.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -