Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

  • Music:


Perhaps this is the problem.... the reference-counting mechanism on my LJRequest object is used like this:
    if (m_reqLoadFriendOf)
But the problem is that if the RemoveRef() actually does end up deleting the object, nothing ever nulls out the request object pointer. I need to change the RemoveRef prototype to be like:
    LJRequest::RemoveRef (LJRequest *&reqPtr);
That way I can check if it's non-null (instead of the client-code needing to do it), free it, and set it back to NULL when it's actually freed. None of this would be necessary if I were using Java. Of course, Microsoft doesn't support Java anymore... I supposed I could one day write it in MS-proprietary C# (C-Sharp).. ha!

  • Happy Birthday!

    Happy 20th Birthday, LiveJournal! 🐐🎂🎉

  • hi

    Posting from the iPhone app. Maybe I'm unblocked now.

  • Why, hello...

    Long time no see. How's my baby doing?

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.