From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c938855fbb4e2028 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-07 01:40:12 PST Date: Mon, 07 Jul 2003 10:39:03 +0200 From: =?UTF-8?B?Um9kcmlnbyBHYXJjw61h?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Gnat.Sockets.Stream memory "leak" References: <3f02ab2c$1@epflnews.epfl.ch> <3f0555e1$1@epflnews.epfl.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3f0931e7$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1057567207 128.178.76.8 (7 Jul 2003 10:40:07 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.mailgate.org!news-zh.switch.ch!switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:40098 Date: 2003-07-07T10:39:03+02:00 List-Id: Jano wrote: > =?UTF-8?B?Um9kcmlnbyBHYXJjw61h?= dice... > >>I do not understand you here... Why do you want to store an access to a >>stream? And where (in memory or in disk)? To store it in memory you only >>have to create a variable of the Stream_Access type... > > > In memory, of course. I have some objects that operate over streams. I > pass the stream in an access parameter, but to store it I don't care > (nor know) if they are Stream_io.Stream_access or Sockets.Stream_access, > etc so I can't use any of the preexistent Stream_access types. I need to > define my own access to Root_stream_type'Class. I simply would find > convenient that these root'Class access where defined where it all > starts: in Ada.Streams. Since I must "with" that package to have access > parameters to streams, it would spare me the definition. > > I hope it's clearer now. Yes, I fully understand your problem now and, frankly, I do not really know why they did not define an access to streams type in Ada.Streams. Anyway, you can still use the one defined in Stream_IO, as it is an access to the Root_Stream_Type'Class (you can also assign "socket streams" or any other kind of stream to it). Rodrigo