objective-see / objective-see/BlockBlock

Memory leak due to autoreleasepools not getting drained

Open
#21 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
848
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Was having issues with heavy memory usage, and upon inspection it looks like there's a lot of NSDatas and NSStrings lying around

When randomly clicking on some of them, most were referenced only by autorelease pools, and were initially created by [NSString UTF8String] and [NSString stringWithFormat:], so I'm guessing they were made by Shared/logging.m:logMsg but it's hard to tell as I don't have symbols
If you have the dsym available for 1.1.0 this should be helpful: memgraph with malloc stack logging

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Shared/logging.m and its logMsg function, then inspect the supplied memgraph with malloc stack logging if symbols or the 1.1.0 dSYM are available. Confirm whether autorelease pools retain objects created through NSString UTF8String or stringWithFormat:, and use the memory evidence to verify that the leak is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.