[SDL] ot - memory leaks
Jacek Poplawski
jacekpoplawski at gmail.com
Fri Aug 3 02:10:12 PDT 2007
On 8/3/07, neil at cloudsprinter.com <neil at cloudsprinter.com> wrote:
>
> but if it's inside a function i can only access it from that function, my
> (probably worng) understanding was that anything created in a function was
> killed at the end of that fucntion, or is that java?
If you allocate memory inside function you should free it inside or outside
that function.
That's why using pointers in dangerous.
I think you should play with C/C++ first. You can find lots of good books
about it.
--
Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from
http://decopter.sf.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/private.cgi/sdl-libsdl.org/attachments/20070803/818c2cce/attachment.html
More information about the SDL
mailing list