From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: freeing general access types
Date: 24 Dec 2002 09:36:10 -0500
Date: 2002-12-24T14:48:16+00:00 [thread overview]
Message-ID: <uwulzh4bp.fsf@nasa.gov> (raw)
In-Reply-To: URMN9.439243$%m4.130871@rwcrnsc52.ops.asp.att.net
tmoran@acm.org writes:
> If P is a general access type, is there any way to know whether it's
> pointing to allocated storage, and should have Ada.Unchecked_Deallocation
> applied to avoid a memory leak, or it's pointing at a declared
> object, which should not be deallocated?
I don't think so. I use naming conventions and distinct types for
that; one access type either _always_ points to constants, or _always_
should be deallocated.
Or you can store info inside the type that gives this information.
--
-- Stephe
prev parent reply other threads:[~2002-12-24 14:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-23 23:19 freeing general access types tmoran
2002-12-23 23:35 ` Robert A Duff
2002-12-24 14:36 ` Stephen Leake [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox