memory.html

Inside

Featured

Elsewhere

Another view

This page is also available in

powered by blosxom.

Technology/Programming

After a long time away, I've returned in the area of manual memory management. The reference counting model in Apple's frameworks is pretty nice and easy, but of course not as easy as automatic garbage collection would be.

I got a reminder yesterday, when I used a tool to check if it finds any memory leaks in my program. Indeed it found one place where I had forgot to release an object. That was easy to fix, but fixing that one revealed another bug. In a related code I released an object twice, which happened to be one time too much, causing a crash elsewhere. One bug hid another.

There has been a couple of occasions before where I tried to use a deallocated object, but those have surfaced immediately. I still consider myself lucky (or maybe just good?) in that I haven't run into any more problems with memory management in this project.

December 2, 2009