From: fracttcarf@yahoo.co.kr (Bini)
Subject: Re: Memory_Management
Date: 19 Apr 2005 18:06:01 -0700
Date: 2005-04-19T18:06:01-07:00 [thread overview]
Message-ID: <6cf157bb.0504191706.58f199ba@posting.google.com> (raw)
In-Reply-To: mailman.47.1113902314.24457.comp.lang.ada@ada-france.org
Duncan Sands <baldrick@free.fr> wrote in message news:<mailman.47.1113902314.24457.comp.lang.ada@ada-france.org>...
> Hi Bini, maybe what is happening is this:
>
> > I1 := (AF.Controlled with Value => new Integer'(123));
>
> here the right-hand-side (RHS) is an object of My_Data type.
> You assign it to I1, another object of My_Data type. After
> the assignment, RHS is finalized. This frees the memory - the
> same memory I1.Value is pointing to. In detail:
>
> (0) Memory is allocated to hold the integer 123. A pointer
> to the memory is in RHS.Value.
> (1) a bit-wise copy is made of RHS onto I1. I1.Value points
> to the integer.
> (2) Adjust is called on I1. Since you don't seem to have
> defined Adjust, this does nothing.
> (3) Finalize is called on RHS. This frees the memory holding
> 123. Now I1.Value is pointing to freed memory.
>
> You then look at I1.Value.all, which could be anything.
>
> You need to define Adjust.
>
> All the best,
>
> Duncan.
Ok. I understand. Thank you very much.
next prev parent reply other threads:[~2005-04-20 1:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-19 1:39 Memory_Management Bini
2005-04-19 9:18 ` Memory_Management Duncan Sands
2005-04-20 1:06 ` Bini [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-19 20:30 Memory_Management Anh Vo
2005-05-26 0:57 memory management alex goldman
2005-05-26 2:14 ` David C. Hoos, Sr.
2005-05-26 13:21 ` Steve
2005-05-26 18:40 ` alex goldman
2005-05-28 2:13 ` Steve
2005-05-28 5:19 ` Jeffrey Carter
2005-05-28 14:48 ` Steve
2005-05-26 18:47 ` Pascal Obry
2005-05-27 14:33 ` Martin Krischik
2005-05-26 12:10 ` Robert A Duff
2005-05-27 14:31 ` Martin Krischik
2005-05-28 11:44 ` Robert A Duff
2005-05-28 13:03 ` Simon Wright
2005-05-31 12:04 ` Robert A Duff
2005-06-02 15:42 ` Thomas Maier-Komor
2005-06-02 17:05 ` Robert A Duff
2005-06-03 1:41 ` Steve
2005-06-03 10:12 ` alex goldman
2005-06-13 4:01 ` Dave Thompson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox