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-04 03:24:43 PST Date: Fri, 04 Jul 2003 12:23:38 +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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3f0555e1$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1057314273 128.178.76.8 (4 Jul 2003 12:24:33 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.netkonect.net!btnet-peer0!btnet!news.mailgate.org!news-zh.switch.ch!switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:40050 Date: 2003-07-04T12:23:38+02:00 List-Id: Jano wrote: > =?UTF-8?B?Um9kcmlnbyBHYXJjw61h?= dice... > >>Jano wrote: >> >> >>>And, as a side note, why doesn't exist a Stream_access type in >>>Ada.Streams? I find somewhat inconvenient defining it in my packages and >>>converting here and there. >> >>My opinion is that they left this for each concrete implementation of >>streams. For instance, Ada.Streams.Streams_IO has the Stream_Access type >>and GNAT.Sockets has it as well. You do not have to define it in your >>own packages. > > > That's okay, I'm thinking more about when I need to store an access > somewhere (not merely pass it as an access parameter), being it > completely irrelevant what is the precise accessed stream. Then I need > to roll out my own stream_access to Root'Class. > 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... Can you give an example of what you mean? Rodrigo PS: I would not worry about having to free the memory taken for the stream access as long as you close the socket.