Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:46:05+00:00 2026-05-25T02:46:05+00:00

The application I’m working on at the moment is accumulating more and more memory

  • 0

The application I’m working on at the moment is accumulating more and more memory as time passes. It’s not really a memory leak, since the Leaks tool doesn’t recognize it as a leak, but it is something that keeps on taking more and more memory.

I’ve been using Instruments (Memory Allocation tool) to find out why this happens, and I am now making heapshots in order to find the memory differences between different points in the running cycle. It seems that after each cycle, the memory used increases by around 560 KB.

This is how it looks like in the Instruments tool:

Instruments initial

And when choosing the CFString row:

CFString allocation

The full Stack Trace from the right side looks like this:

   0 CoreFoundation _CFRuntimeCreateInstance
   1 CoreFoundation __CFStringCreateImmutableFunnel3
   2 CoreFoundation CFStringCreateWithBytes
   3 Foundation -[NSString initWithCoder:]
   4 Foundation _decodeObject_old
   5 SyncServices -[ISDProperty initWithCoder:]
   6 SyncServices -[ISDRelationship initWithCoder:]
   7 Foundation _decodeObject_old
   8 Foundation _decodeValueOfObjCType
   9 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  10 Foundation -[NSArray(NSArray) initWithCoder:]
  11 Foundation _decodeObject_old
  12 SyncServices -[ISDEntity initWithCoder:]
  13 Foundation _decodeObject_old
  14 Foundation _decodeValueOfObjCType
  15 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  16 Foundation -[NSArray(NSArray) initWithCoder:]
  17 Foundation _decodeObject_old
  18 SyncServices -[ISDRelationship initWithCoder:]
  19 Foundation _decodeObject_old
  20 Foundation _decodeValueOfObjCType
  21 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  22 Foundation -[NSArray(NSArray) initWithCoder:]
  23 Foundation _decodeObject_old
  24 SyncServices -[ISDEntity initWithCoder:]
  25 Foundation _decodeObject_old
  26 Foundation _decodeValueOfObjCType
  27 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  28 Foundation -[NSArray(NSArray) initWithCoder:]
  29 Foundation _decodeObject_old
  30 SyncServices -[ISDRelationship initWithCoder:]
  31 Foundation _decodeObject_old
  32 Foundation _decodeValueOfObjCType
  33 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  34 Foundation -[NSArray(NSArray) initWithCoder:]
  35 Foundation _decodeObject_old
  36 SyncServices -[ISDEntity initWithCoder:]
  37 Foundation _decodeObject_old
  38 Foundation _decodeValueOfObjCType
  39 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  40 Foundation -[NSArray(NSArray) initWithCoder:]
  41 Foundation _decodeObject_old
  42 SyncServices -[ISDRelationship initWithCoder:]
  43 Foundation _decodeObject_old
  44 Foundation _decodeValueOfObjCType
  45 Foundation -[NSUnarchiver decodeValueOfObjCType:at:]
  46 Foundation -[NSArray(NSArray) initWithCoder:]
  47 Foundation _decodeObject_old
  48 SyncServices -[ISDEntity initWithCoder:]
  49 Foundation _decodeObject_old
  50 Foundation +[NSUnarchiver unarchiveObjectWithData:]
  51 SyncServices -[ISDObjectGraphWrapper initWithCoder:]
  52 Foundation -[NSKeyedPortCoder decodeObjectForKey:]
  53 Foundation -[NSArray(NSArray) initWithCoder:]
  54 Foundation -[NSKeyedPortCoder decodeObjectForKey:]
  55 Foundation -[NSKeyedPortCoder _decodeObjectNoKey]
  56 Foundation -[NSKeyedPortCoder _walkAndDecodeDataWithType:at:chase:invocation:inStructure:]
  57 Foundation decodeInvocationArguments
  58 Foundation -[NSKeyedPortCoder decodeInvocation]
  59 Foundation -[NSKeyedPortCoder decodeObjectForKey:]
  60 Foundation -[NSConnection handleRequest:sequence:]
  61 Foundation -[NSConnection handlePortCoder:]
  62 Foundation -[NSConnection dispatchWithComponents:]
  63 Foundation __NSFireMachPort
  64 CoreFoundation __CFMachPortPerform
  65 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
  66 CoreFoundation __CFRunLoopDoSource1
  67 CoreFoundation __CFRunLoopRun
  68 CoreFoundation CFRunLoopRunSpecific
  69 Foundation -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
  70 SyncServices -[ISyncConcreteSession _waitForTransitionFromPhase:untilDate:]
  71 SyncServices +[ISyncSession _sessionWithClient:entityNames:beforeDate:clientHasTruthForEntityNames:quietlyPushTruth:target:selector:anchors:hasChanges:skip:error:]
  72 SyncServices +[ISyncSession beginSessionWithClient:entityNames:beforeDate:]
  73 SyncServices -[ISyncConcreteSessionDriver _beginSyncSession:]
  74 SyncServices -[ISyncConcreteSessionDriver _preSync]
  75 SyncServices -[ISyncConcreteSessionDriver _sync:]
  76 SyncServices -[ISyncConcreteSessionDriver sync]
  77 **Our application** - [SLSyncOperation performLocalSync] /Users/andrei/Desktop/MacOSX_Client/osx/Classes/SLSyncOperation.m:94
  78 **Our application** -[SLSyncOperation main] /Users/andrei/Desktop/MacOSX_Client/osx/Classes/SLSyncOperation.m:251
  79 Foundation -[__NSOperationInternal start]
  80 Foundation ____NSOQSchedule_block_invoke_2
  81 libdispatch.dylib _dispatch_call_block_and_release
  82 libdispatch.dylib _dispatch_worker_thread2
  83 libsystem_c.dylib _pthread_wqthread
  84 libsystem_c.dylib start_wqthread

I am using SyncServices in order to get contact information. I’m using an ISyncSessionDriver to check (sync) for new information at a certain time interval (10 seconds, can be seen on the memory allocation image as well). The code looks like this.

SLSyncSessionDriverDataSource *dataSource = [[SLSyncSessionDriverDataSource alloc] initWithManagedObjectModel:managedObjectModel context:managedObjectContext];

ISyncSessionDriver *localDriver = [ISyncSessionDriver sessionDriverWithDataSource:dataSource];
SLSyncSessionDriverDelegate *theDelegate = [[SLSyncSessionDriverDelegate alloc] init];
[localDriver setDelegate:theDelegate];

[theDelegate release];
[dataSource release];    

[localDriver sync];

Thanks for any help you could give me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:46:06+00:00Added an answer on May 25, 2026 at 2:46 am

    Assuming you’ve found a real leak, a few ideas:

    • You can only run the sync when there’s likely to be new
      information (watch for changes in ~/Library/Application
      Support/AddressBook
      with kqueue or FSEvents).

    • You could run the sync in a child process which you recycle periodically, or with the previous suggestion, just have a single run of the process do a sync then exit.

    Sync Services never worked terribly well and is deprecated as of 10.7, so I imagine it won’t see much if any additional work. I don’t think it’d be a waste of time to come up with a self-contained example and submit it as a bug, especially if it’s leaking this badly. Also, I’d suggest filing another bug on the Address Book framework explaining that you’d like the ability to check for/be notified of new/updated information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application is a dll based implementation and probably leaks memory during unload. I
Application able to record error in OnError, but we are not able to do
Application has an auxiliary thread. This thread is not meant to run all the
Application : I am working on one mid-large size application which will be used
Application Specific Information: com.oneorangetree.iphoneexample failed to launch in time elapsed total CPU time (seconds):
Application Specific Information: com.my-app failed to launch in time Elapsed total CPU time (seconds):
application = webapp.WSGIApplication( [(r'/main/profile/([a-f0-9]{40})', ProfileHandler)], debug=True) The regex in the above parameter will not
My application is not all to complicated. It retrieves a single entity from a
application for project .....csproj is not installed. Make sure the application for the project
APPLICATION DESCRIPTION : I am a new iPhone developer. I am working on an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.