• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: I'm leaking memory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I'm leaking memory


  • Subject: Re: I'm leaking memory
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 12 Feb 2005 19:29:06 -0800

On Feb 11, 2005, at 12:32 PM, Brian O'Brien wrote:
@interface dicomSCP : NSObject {


std::string myAET;
std::list<std::string> acceptAETs;
int portno;

}

In my methods any time I try to set these member variables an exception is raised...
I'm sorry I'm new to Cocoa and ObjectiveC but it seems to me that somehow these member variables
are not initialized....

That's correct. Objective-C++ allows Objective-C and C++ code to be integrated at the statement level, but the runtimes are entirely distinct. Your instance variables myAET and acceptAETs will not have their constructors or destructors called because they're instance variables of an Objective-C class, not a C++ class. You need to make them pointers and manage their memory some other way.

-- Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >I'm leaking memory (From: "Brian O'Brien" <email@hidden>)
 >Re: I'm leaking memory (From: "Brian O'Brien" <email@hidden>)
 >Re: I'm leaking memory (From: John Stiles <email@hidden>)
 >Re: I'm leaking memory (From: "Brian O'Brien" <email@hidden>)
 >Re: I'm leaking memory (From: Ricky Sharp <email@hidden>)
 >Re: I'm leaking memory (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
  • Next by Date: Re: NSMatrix and NSImageCell and Bindings
  • Previous by thread: Re: I'm leaking memory
  • Next by thread: Re: I'm leaking memory
  • Index(es):
    • Date
    • Thread