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

Neil Pilgrim <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
Nick Lewycky wrote:
> 
> Neil Pilgrim wrote:
> 
> [snip excellent point-by-point analysis]
[snip need to add it to tutorial agreement]
[POA removes all graphics on client termination]

Yes, of course, thanks for pointing out the obvious thing I missed :)

> But the fact that a program can be written to leak so easily bothers me
> too. Why can't the compiler be made to catch this? Well, that would be a
> change to CORBA which we aren't really in a position to make. Or why
> does it return a Graphic_ptr type instead of a Graphic_var? Does it matter?

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.

Comments?

-- 
Neil
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.