Coder Social home page Coder Social logo

Comments (4)

lukhnos avatar lukhnos commented on August 16, 2024

If your user quickly cause your app to send multiple request, you have to cancel the previous request. If the request object is not reused, you also want to make sure that the delegate is set to nil before it's canceled and released.

Have you tried to do that?

from objectiveflickr.

bigdreamkid avatar bigdreamkid commented on August 16, 2024

Hi Lukhnos,

Thank you so much, I already tried it, everything works great.
Appreciate your helps.

Have a good day.

On Thu, Feb 23, 2012 at 10:22 AM, Lukhnos D. Liu <
[email protected]

wrote:

If your user quickly cause your app to send multiple request, you have to
cancel the previous request. If the request object is not reused, you also
want to make sure that the delegate is set to nil before it's canceled and
released.

Have you tried to do that?


Reply to this email directly or view it on GitHub:
#29 (comment)

from objectiveflickr.

PaulSolt avatar PaulSolt commented on August 16, 2024

Thanks for the tip. Apparently my code worked before I switched to ARC, but afterwards it would crash in readStreamHasBytesAvailable. I had to add a dealloc method to cleanup the request/context.

// Fixed ARC dealloc

  • (void)dealloc {
    [flickrRequest cancel];
    flickrRequest.delegate = nil;
    flickrRequest = nil;

    flickrContext = nil;
    }

I'm not sure if the old dealloc that the conversion removed caused the issue to emerge. Before my method has release statements.

// Pre-ARC dealloc

  • (void)dealloc {
    [flickrContext release];
    [flickrRequest release];
    [super dealloc];
    }

from objectiveflickr.

soumalya avatar soumalya commented on August 16, 2024

Hello lukhnos,

Thanks for your help. It helped me a lot.

from objectiveflickr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.