Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualfrob

Posted 04 May 2013 - 09:43 PM

It looks like you are correct.  I don't see anywhere in their example code that they free the memory the allocated with malloc() except in the case where there is a failure in initialization.

 

My guess is that they are just leaking the memory, making the OS clean up after them.

 

I agree it is a bad practice.  You should take ownership of your objects and manage their lifetimes properly.


#1frob

Posted 04 May 2013 - 09:43 PM

It looks like you are correct.  I don't see anywhere in their example code that they free the memory the allocated with malloc() except in the case where there is a failure in initialization.

 

My guess is that they are just leaking the memory, making the OS clean up after them.

 

t is a bad practice.  You should take ownership of your objects and manage their lifetimes properly.


PARTNERS