From: sjw <simon.j.wright@mac.com>
Subject: Re: Protected object which never get finalized
Date: Mon, 15 Feb 2010 10:08:18 -0800 (PST)
Date: 2010-02-15T10:08:18-08:00 [thread overview]
Message-ID: <b1fdd8e7-570f-42f7-b614-c25392eb8e01@d27g2000yqn.googlegroups.com> (raw)
In-Reply-To: nospam-53FA2E.07354714022010@news.aioe.org
On Feb 14, 12:35 pm, "John B. Matthews" <nos...@nospam.invalid> wrote:
> I get the same result with gcc 4.3.4, but it works if protected type
> A_Type is public in P:
>
> package P is
> protected type A_Type is
> private
> Spy : Spies.Instance_Type
> (Client_Name => new String'("P.A_Type"));
> end;
> end P;
>
> Type A_Type has its own private part, and this seems more comparable to
> the declaration of protected type B_Type. Is there any reason to make
> A_Type more opaque?
I had wanted to write
private
Name : aliased constant String := "P.A_Type";
protected type A_Type is
private
Spy : Spies.Instance_Type
(Client_Name => Name'Access);
end;
end P;
to avoid allocating a new Client_Name at each instance creation. This
looks a little messy if in the public part.
next prev parent reply other threads:[~2010-02-15 18:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-13 0:45 Protected object which never get finalized Hibou57 (Yannick Duchêne)
2010-02-14 12:35 ` John B. Matthews
2010-02-15 18:08 ` sjw [this message]
2010-02-15 19:22 ` Hibou57 (Yannick Duchêne)
2010-02-15 19:20 ` Hibou57 (Yannick Duchêne)
2010-02-15 20:23 ` John B. Matthews
2010-02-15 20:44 ` Adam Beneschan
2010-02-15 22:26 ` Hibou57 (Yannick Duchêne)
2010-02-16 0:23 ` John B. Matthews
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox