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

  • Home
  • SEARCH
  • 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 6998089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:22:01+00:00 2026-05-27T20:22:01+00:00

Here I am parsing my JSON Data in a GCD Queue . Here i

  • 0

Here I am parsing my JSON Data in a GCD Queue . Here i am using a class method to get the values. In my GCD queue i am allocating and releasing some arrays . Is this a right way to do in a GCD queue or i have to use the __block specifier. Want to clear my confusion

+ (void)startProcessingFeeds:(NSData *)fetchedData{

    dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);  
    dispatch_async(concurrentQueue, ^(void) {


        NSMutableArray *idArrayTemp = [[NSMutableArray alloc] init];
        NSMutableArray *titleArrayTemp = [[NSMutableArray alloc] init];
        NSMutableArray *filesArray = [[NSMutableArray alloc] init];

        MBFeeds *feeds = [MBFeeds getFeeds];

        NSString *response = [[[NSString alloc] initWithData:fetchedData encoding:NSASCIIStringEncoding] autorelease] ;
        NSMutableDictionary *newsDic  = [response JSONValue];
        NSMutableDictionary *tempNested = [newsDic valueForKey:@"data"];

        /* here i am taking the values from dictionary and storing that to a array in my Singleton class  */

        [idArrayTemp release];
        [titleArrayTemp release];
        [filesArray release];

    });


}
  • 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-27T20:22:01+00:00Added an answer on May 27, 2026 at 8:22 pm

    If I understand you correctly you are reading data and then storing it in a singleton so you can access it somewhere else. As long as the singleton is ensuring the data is retained (by using retained properties for example) then there should be no problem with your code.

    __block is only needed when you want to create a variable out side of a block and have it manipulated inside a block. An example is when using a block to process array data.

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

Sidebar

Related Questions

A project for class involves parsing Twitter JSON data. I'm getting the data and
I am parsing json data and trying to store some of the json data
I am using following code for other JSON data its working but here it
I want to parse some JSON data. I'm using James Newton-King's JSON.NET library .
Possible Duplicate: Sending and Parsing JSON in Android I am fetching JSON Data from
As the title says, I have slickgrid getting/parsing JSON data from PHP, but while
I'm having a bit of an issue with parsing json with python using the
I am parsing with the JSON parser. I stored the data into searchURL ,
i'm having a problem with parsing the json data from hello.json to the current
I'm having trouble in parsing my JSON data in jQuery autocomplete. My JSON comes

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.