#218 open
Skip

Leaking NSTasks

Reported by Skip | October 29th, 2009 @ 06:12 PM

With three (or more) repositories open and multiple commits/refreshes to each through the day, the CPU usage of GitX (v0.7.1) appears to increase proportionate to use. So I ran GitX (cloned today) via Instruments and took a look for leaks as a first step.

Each call to PBEasyPipe taskForCommand: class method allocs an NSTask, but I am unable to find a location where these NSTasks are later being released. Hypothesizing, I wonder if these processes consume resources (cpu & memory) until GitX is quit because they are never released (even though they have presumably all terminated)?

Perhaps taskForCommand: should use
+ (NSTask )launchedTaskWithLaunchPath:(NSString )path arguments:(NSArray *)arguments

or perhaps the taskForCommand: callers should register for NSTaskDidTerminateNotification and the observer method would [task release]

Given that repository refreshes each spin off a new NSTask, it follows that heavy use of GitX would result in an increasing memory and cpu footprint.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GitX is the nice-looking gitk clone for OS X

People watching this ticket

Attachments

Tags

Pages