Why malloc memory in a function and free it outside is a bad idea?

Posted by skydoor on Stack Overflow See other posts from Stack Overflow or by skydoor
Published on 2010-03-31T02:05:13Z Indexed on 2010/03/31 2:13 UTC
Read the original article Hit count: 347

Filed under:
|

if this is a bad idea, how to allocate memory in the function?

© Stack Overflow or respective owner

Related posts about malloc

Related posts about memory-management