Re: Question on Objective C++
Re: Question on Objective C++
- Subject: Re: Question on Objective C++
- From: "Kenneth C. Dyke" <email@hidden>
- Date: Wed, 6 Mar 2002 10:53:19 -0800
Objects in Objective C always begin life with all instance variables
cleared to 0 (well, aside from 'isa'), so you should be okay.
-Ken
On Wednesday, March 6, 2002, at 09:46 AM, Oscar Morales Vivs wrote:
Hi there. I'm trying to build a Cocoa front-end to a bunch of C++ code
I have. I've read the Objective-C++ documentation and it seems it will
work fine for me. There's a couple of doubts I have, however.
The docs state that the only C++ object instances that you can put in
an Objective-C object are those that don't have virtual functions. It
also says that constructors and destructors won't be called when
init/dealloc the object. However: is there some kind of default
initialization done on the instance data of an Objective-C object? The
C++ objects I plan to use as instance variables are smart pointers
which would be fine if they were initialized to 0 (as I could later
change their value in init) but would cause me no end of troubles if
garbage were left on them. The docs didn't make it clear on this point.
Thanks in advance for your help.
Oscar Morales.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
Kenneth Dyke, email@hidden (personal), email@hidden (work)
Sr. Mad Scientist, MacOS X OpenGL Group, Apple Computer, Inc.
C++: The power, elegance and simplicity of a hand grenade.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.