Re: [Fresco-devel] Graphic_var's and server stability

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Wed, Oct 30, 2002 at 10:09:54AM +0000, Neil Pilgrim wrote:
[...]
> One thing that springs to mind: could the orb have some 'strict' mode
> where Foo_ptr's have no copy-constructor/assignment-operator? Would that
> help? Sure it wouldn't stop:
> 
> layoutkit->vfill()
> 
> from leaking (but which is just the same as calling 'new foo();', which
> is fairly unlikely, you'd hope), but it'd stop
> 
> Graphic_ptr f = layoutkit->vfill()
> 
> and require (better in all cases?)
> 
> Graphic_var f = layoutkit->vfill()
> 
> and also disallow the problem here (afaict)
> 
> vbox->append_graphic(layoukit->vfill())
> 
> Would that change present a problem in other cases? While this would not
> be standard-compliant behaviour, I don't see that this would be a bad
> change except wrt old code, which is why it'd be introduced (initially)
> only in a 'strict' mode.

Well, two objections spring to mind.  One is that Foo_ptr's are
designed to be implementable using a simple C++ pointer, and, if you
look at the code omniidl generates, omniORB does exactly this.  So
you'd have to convert them into a full class if you wanted to add
these semantics... though I suppose that with a good compiler (and
with RTTI turned off, I suppose), that wouldn't really effect the
final generated code.

Also, I recall some article talking about the CORBA memory management
stuff describing how i got this way; apparently, two different groups
submitted different proposals to the OMG.  One proposal was very
flexible, allowed programs to be very efficient, etc.  The other was
much safer.  The final spec merged the two, so that Foo_ptr's come
from the first proposal, and Foo_var's come from the second.  Aside
from the political points, it sounds like the reason Foo_ptr's are
still around is that Foo_var's just aren't performant enough for some
applications.

There are probably other considerations -- eg, sticky issues in how
you pass things around inside the ORB, etc. -- but I don't know enough
about those to comment :-).  If you really want answers, you might try
the CORBA newsgroup (comp.object.corba or something?).

-- Nathaniel

-- 
"Lull'd in the countless chambers of the brain,
Our thoughts are link'd by many a hidden chain:
Awake but one, and lo! what myriads rise!
Each stamps its image as the other flies"
  -- Ann Ward Radcliffe, The Mysteries of Udolpho

This email may be read aloud.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.