Re: I'm leaking memory
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