Re: Question on Objective C++
Re: Question on Objective C++
- Subject: Re: Question on Objective C++
- From: Lance Bland <email@hidden>
- Date: Wed, 6 Mar 2002 15:07:14 -0500
On Wednesday, March 6, 2002, at 02:51 PM, Chris Thomas wrote:
last time I checked ...
On Wednesday, March 6, 2002, at 12:46 PM, Oscar Morales Vivs wrote:
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.
I find that hard to believe. The docs must be wrong. It probably means
you can only place pointers and new them on the freestore. You probably
can't have value or reference definitions.
I'm pretty sure the docs are correct on this point. You can define a C++
class as an inline value, as long as the class has no vtable. The
following
is perfectly legal:
That is slightly different than the first statement and I can believe
what you say. I was speaking of a pointer ivar (pointer to a C++ object
on the freestore) where you new them in the init method and delete them
in the dealloc method. What you are saying is entirely different. I've
never inlined C++ objects as an ivar to a obj-c object so I won't
comment on that, except to say what you wrote make sense.
Thanks for explaining that.
-lance
_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization
_______________________________________________
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.