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 7545951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:04:20+00:00 2026-05-30T09:04:20+00:00

The line return (__bridge DCSDictionaryRef)d; gives me a Address of stack memory associated with

  • 0

The line
return (__bridge DCSDictionaryRef)d;
gives me a “Address of stack memory associated with local variable retured to caller?” warning. Ideally I think I ought to create a new copy of the DCSDictionaryRef instance but I’m absolute clueless about how it works.
Would appreciate any hints/help on how I can get rid of the warning (and a potential leak or the object being gcollected midway).

P.S. DCSCopyAvailableDictionaries and DCSDictionaryGetShortName are one of the ‘undocumented’ functions in CoreFoundation.

DCSDictionaryRef _DCSDictionary() {
NSArray *dicts = DCSCopyAvailableDictionaries();
for (NSObject *d in dicts) {
    NSString *sn = DCSDictionaryGetShortName((__bridge DCSDictionaryRef)d);
    NSLog(@"%@", sn);
    if ([sn isEqualToString:@"Thesaurus"]) {
        return (__bridge DCSDictionaryRef)d;
    }
}
return NULL;
}
  • 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-30T09:04:22+00:00Added an answer on May 30, 2026 at 9:04 am

    I believe you need one of the following:

    • A DCSDictionaryRef copy function
    • Documentation for the memory structure of DCSDictionaryRef
    • Very impressive hacking skills that allow you to archive a DCSDictionaryRef (and every object it points to) and unarchive it at another memory location

    Here’s Apple documentation about memory management for CoreFoundation. The gist is you need a Copy function applicable to the data type you are using. See if you can locate and call a DCSDictionaryRef copy function. The example in the linked documentation is that a function called CFStringCreateCopy would be used to copy a CFString object.

    I’ve never tried something like this before, but it might be possible to archive the object (assuming you are able to know its size), but this also entails knowing which bits represent pointers, and subsequently archiving the objects the pointers point to as well, which also entails knowing the types and sizes of those objects. If you’re able to successfully archive it, then you might have a shot at unarchiving it elsewhere in memory.

    I think this is a very deep rabbit hole.

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

Sidebar

Related Questions

In the following code is the second line redundant? doesn't the first line return
In my code i write the following line: return ((value / 120) * 1440).ToString();
after_photo_post_process :post_process_photo def post_process_photo img = EXIFR::JPEG.new(photo.queued_for_write[:original].path) # error on this line return unless
My concern is about what will use stack memory in an instruction involving arithmetics
This mysql command line return me: count(*) 19 . It's a big problem for
I am receiving an error at this line return folder.SubFolders.Aggregate(count, (current, subfolder) => GetFilesCount(subfolder,
I keep on having a NUllPointerException on the line: return mDb.insert(DATABASE_TABLE, null, initialValues); I
I'm seeing getconf ARG_MAX from command line return a big number (2,097,152 bytes), and
I have a usort function with a single line: return 0. I tried to
I found this strange thing. XCode instruments tell me that this line return (SDZPerson*)[[[SDZPerson

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.