comp.lang.ada
 help / color / mirror / Atom feed
From: Adrien Plisson <aplisson-news@stochastique.net>
Subject: Re: Unchecked deallocation question
Date: Fri, 26 Nov 2004 00:24:15 +0100
Date: 2004-11-26T00:24:15+01:00	[thread overview]
Message-ID: <41a66926$0$25070$ba620e4c@news.skynet.be> (raw)
In-Reply-To: <4540106.PdnsrBBvo5@linux1.krischik.com>

Martin Krischik wrote:
> You should carefully thing if you really need it. Unlike C/C++ the following
> is actually valid:
> 
> declare
>     It : Root'Class := Derived'(...);
> begin
>     ...
> end;

mmmm, i don't think there is any problem doing this in C++:

class Root;
class Derived : public Root;

Root &It = Derived( ... );

it just uses a reference type which is almost the same as ada access 
type but you cannot assign null to it and cannot dereference it.

-- 
rien




  parent reply	other threads:[~2004-11-25 23:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 15:38 Unchecked deallocation question Alex R. Mosteo
2004-11-24 17:24 ` Jeffrey Carter
2004-11-24 17:35   ` Alex R. Mosteo
2004-11-24 17:33 ` David Botton
2004-11-25  8:35 ` Martin Krischik
2004-11-25  9:12   ` Alex R. Mosteo
2004-11-25 23:24   ` Adrien Plisson [this message]
2004-11-26  4:05     ` Jim Rogers
2004-11-26 10:53       ` Sergey
2004-11-26  9:06     ` Dmitry A. Kazakov
2004-11-26 18:20       ` Sergey
2004-11-27  8:43         ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox