Tuesday, May 8, 2018


Hunting Memory Leaks (Mac)
Date: 3/27/18
Author: Tyler Murray
First week of the 2nd month of Final Project. My goal is to locate and clean up any memory leaks found on the Mac side of Gatware. The problem that going to come up is learning another coding language (Objective-C), Find code or some way to help me locate the memory leaks, and what is causing the leaks.
After doing some research I learned the very basics of Objective-C which will allow me to go through and understand what is going on. Also while doing my research I came to a solution of what I can use to help me locate the memory leaks on the Mac side. When you run Gateware on profiling (aka Debug mode) It will bring up an application called instruments which has a variety of tools you can use while debugging. One of those tools being “Leaks” of which you guess it, helps you locate memory leaks in your program. After giving that a run I was able to see five memory leaks. As of right now I was able to clean-up four out of the five memory leaks. Three being within GAudio and one being in GWindow’s unit test.
The last one is still a mystery since it says it NSAutoreleasePool related. I checked all the pools being created and all of them are being drained (aka freeing the memory). For the rest of this week I’ll be doing some more research on NSAutoreleasePools and Objective-C memory management to hopefully help me narrow were this problem is coming from.

No comments:

Post a Comment