From: Jeffrey Carter <spam@spam.com>
Subject: Re: Private area and child packages
Date: Fri, 31 Dec 2004 19:02:15 GMT
Date: 2004-12-31T19:02:15+00:00 [thread overview]
Message-ID: <XmhBd.13492$RH4.12082@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <1104515735.052116.248180@c13g2000cwb.googlegroups.com>
danmcleran@hotmail.com wrote:
>
> But then how do I know when the access to the Implementation object
> goes out of scope? It seems to me that I need to either derive from
> Ada.Finalization.Limited_Controlled or define Something as a smart
> pointer to Implementation.
Yes, to manage memory the best approach is a controlled type. Smart
pointers are good because they do reference counting and eliminate
dangling references.
There doesn't seem to be any way to prevent a child package from making
copies of access values if you decide to hide the implementation of a
visible type in the package body.
--
Jeff Carter
"Ada has made you lazy and careless. You can write programs in C that
are just as safe by the simple application of super-human diligence."
E. Robert Tisdale
72
next prev parent reply other threads:[~2004-12-31 19:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-29 4:05 Private area and child packages danmcleran
2004-12-29 4:47 ` tmoran
2004-12-29 15:10 ` danmcleran
2004-12-30 18:51 ` tmoran
2005-01-01 3:45 ` danmcleran
2004-12-29 4:49 ` Jeffrey Carter
2004-12-29 15:27 ` danmcleran
2004-12-29 16:53 ` Samuel Tardieu
2004-12-30 4:07 ` Jeffrey Carter
2004-12-30 15:31 ` danmcleran
2004-12-30 18:14 ` Jeffrey Carter
2004-12-31 17:55 ` danmcleran
[not found] ` <1104515735.052116.248180@c13g2000cwb.googlegroups.com>
2004-12-31 19:02 ` Jeffrey Carter [this message]
2004-12-29 19:05 ` Martin Krischik
2004-12-29 21:44 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox