* Re: Unchecked_Deallocation
1997-10-22 0:00 Unchecked_Deallocation Scott Barrish
@ 1997-10-22 0:00 ` bklungle
1997-10-22 0:00 ` Unchecked_Deallocation Anonymous
1 sibling, 0 replies; 10+ messages in thread
From: bklungle @ 1997-10-22 0:00 UTC (permalink / raw)
Try:
with Unchecked_Deallocation; -- Put it about at ***
Scott Barrish <TKEFUFU@icontech.com> wrote in article
<01bcde95$f171ed40$214ec7d0@tkefufu.static>...
> Ada Professionals:
>
> According to my professor's handout's and lecture notes, I should be able
> to do the following:
>
> --Scott Barrish
> --CPSC-151
> --Professor P. Williams
> --October 23, 1997
>
> --First Created: October 21, 1997 6:45pm
> --Last Revised: October 21, 1997 6:45pm
>
> with Ada.Text_IO; use Ada.Text_IO;
with Unchecked_Deallocation; -- ***
>
> package body Stack_Dynamic is
>
> procedure Free is new Unchecked_Deallocation(Object => Element_Type, Name
> => Stack_Ptr);
>
> .
> .
> .
>
> However, when I goto compile in Dubug mode, the compiler complains and
says
> that Unchecked_Deallocation is not found. Ingnoring future references.
>
> I thought that Unchecked_Deallocation is a generic procedure found in
> Ada.Text_IO. If I am wrong, please help me in fixing this part ofmy
code.
>
> I thank you a head of time for your help.
>
> Sincerely,
>
> Scott B.
>
> P.S. E-mail your reply. My news server is very slow.
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Unchecked_Deallocation
@ 1997-10-22 0:00 Scott Barrish
1997-10-22 0:00 ` Unchecked_Deallocation bklungle
1997-10-22 0:00 ` Unchecked_Deallocation Anonymous
0 siblings, 2 replies; 10+ messages in thread
From: Scott Barrish @ 1997-10-22 0:00 UTC (permalink / raw)
Ada Professionals:
According to my professor's handout's and lecture notes, I should be able
to do the following:
--Scott Barrish
--CPSC-151
--Professor P. Williams
--October 23, 1997
--First Created: October 21, 1997 6:45pm
--Last Revised: October 21, 1997 6:45pm
with Ada.Text_IO; use Ada.Text_IO;
package body Stack_Dynamic is
procedure Free is new Unchecked_Deallocation(Object => Element_Type, Name
=> Stack_Ptr);
.
.
.
However, when I goto compile in Dubug mode, the compiler complains and says
that Unchecked_Deallocation is not found. Ingnoring future references.
I thought that Unchecked_Deallocation is a generic procedure found in
Ada.Text_IO. If I am wrong, please help me in fixing this part ofmy code.
I thank you a head of time for your help.
Sincerely,
Scott B.
P.S. E-mail your reply. My news server is very slow.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Unchecked_Deallocation
1997-10-22 0:00 Unchecked_Deallocation Scott Barrish
1997-10-22 0:00 ` Unchecked_Deallocation bklungle
@ 1997-10-22 0:00 ` Anonymous
1 sibling, 0 replies; 10+ messages in thread
From: Anonymous @ 1997-10-22 0:00 UTC (permalink / raw)
On 22 Oct 97 00:11:34 GMT, "Scott Barrish" <TKEFUFU@icontech.com> wrote:
>...
> I thought that Unchecked_Deallocation is a generic procedure found in
> Ada.Text_IO. If I am wrong, please help me in fixing this part ofmy code.
>
Have you asked your professor about this? That should be your first line
of inquiry.
Ada.Unchecked_Deallocation is indeed a generic procedure. It has nothing
to do with Ada.Text_Io (other than both being children of Ada). If you
mention it in a context clause your instantiation should compile fine.
Jeff Carter PGP:1024/440FBE21
My real e-mail address: ( carter @ innocon . com )
"Now go away or I shall taunt you a second time."
Monty Python & the Holy Grail
Posted with Spam Hater - see
http://www.compulink.co.uk/~net-services/spam/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Unchecked_Deallocation
@ 1998-12-01 0:00 robinsoj
1998-12-02 0:00 ` Unchecked_Deallocation Tom Moran
1998-12-03 0:00 ` Unchecked_Deallocation Fanni Kolchina
0 siblings, 2 replies; 10+ messages in thread
From: robinsoj @ 1998-12-01 0:00 UTC (permalink / raw)
Has anyone ever heard of "Unchecked_Deallocation?" If so, what is it?
--
James H. Robinson, III
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Unchecked_Deallocation
1998-12-01 0:00 Unchecked_Deallocation robinsoj
@ 1998-12-02 0:00 ` Tom Moran
1998-12-03 0:00 ` Unchecked_Deallocation Fanni Kolchina
1 sibling, 0 replies; 10+ messages in thread
From: Tom Moran @ 1998-12-02 0:00 UTC (permalink / raw)
>Has anyone ever heard of "Unchecked_Deallocation?" If so, what is it?
Look in any Ada text or reference manual. It's similar to Free.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Unchecked_Deallocation
1998-12-01 0:00 Unchecked_Deallocation robinsoj
1998-12-02 0:00 ` Unchecked_Deallocation Tom Moran
@ 1998-12-03 0:00 ` Fanni Kolchina
1 sibling, 0 replies; 10+ messages in thread
From: Fanni Kolchina @ 1998-12-03 0:00 UTC (permalink / raw)
robinsoj@my-dejanews.com wrote:
: Has anyone ever heard of "Unchecked_Deallocation?" If so, what is it?
:
: --
: James H. Robinson, III
:
: -----------== Posted via Deja News, The Discussion Network ==----------
: http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
Fanni Kolchina kolc7797@sparky.cs.nyu.edu
Computer Science Department
Courant Institute of Mathematical Sciences
^ permalink raw reply [flat|nested] 10+ messages in thread
* unchecked_deallocation
@ 2002-07-17 18:07 Felix Engemann
2002-07-17 18:29 ` unchecked_deallocation Larry Hazel
2002-07-17 21:44 ` unchecked_deallocation Jan Prazak
0 siblings, 2 replies; 10+ messages in thread
From: Felix Engemann @ 2002-07-17 18:07 UTC (permalink / raw)
Hi all,
I'm just writing a generic double linked list package.
I want to implement a function destroy_list, wich should return null
and free the space. My question is:
is all the space freed, if i set a pointer to the first node and then free the
space with free(pointer_to_first_node)
or do i have to delete and free from node to node, in order to free all the
space ?
Thanx Felix
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: unchecked_deallocation
2002-07-17 18:07 unchecked_deallocation Felix Engemann
@ 2002-07-17 18:29 ` Larry Hazel
2002-07-17 21:44 ` unchecked_deallocation Jan Prazak
1 sibling, 0 replies; 10+ messages in thread
From: Larry Hazel @ 2002-07-17 18:29 UTC (permalink / raw)
Felix Engemann wrote:
> Hi all,
>
> I'm just writing a generic double linked list package.
> I want to implement a function destroy_list, wich should return null
> and free the space. My question is:
>
> is all the space freed, if i set a pointer to the first node and then free the
> space with free(pointer_to_first_node)
>
> or do i have to delete and free from node to node, in order to free all the
> space ?
>
> Thanx Felix
You must deallocate every node individually. Use a recursive procedure (not a
function) to do this. Returning a null pointer serves no purpose.
Larry
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: unchecked_deallocation
2002-07-17 18:07 unchecked_deallocation Felix Engemann
2002-07-17 18:29 ` unchecked_deallocation Larry Hazel
@ 2002-07-17 21:44 ` Jan Prazak
2002-07-18 8:13 ` unchecked_deallocation Felix Engemann
1 sibling, 1 reply; 10+ messages in thread
From: Jan Prazak @ 2002-07-17 21:44 UTC (permalink / raw)
On Wed, 17 Jul 2002 17:07:12 -0100, Felix Engemann wrote:
> Hi all,
You should read the postings under "access / freeing memory", I have
asked a very similar question.
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: unchecked_deallocation
2002-07-17 21:44 ` unchecked_deallocation Jan Prazak
@ 2002-07-18 8:13 ` Felix Engemann
0 siblings, 0 replies; 10+ messages in thread
From: Felix Engemann @ 2002-07-18 8:13 UTC (permalink / raw)
Jan Prazak <janp9@gmx.net> wrote in message news:<pan.2002.07.17.20.42.39.581807.1851@gmx.net>...
> On Wed, 17 Jul 2002 17:07:12 -0100, Felix Engemann wrote:
>
> > Hi all,
>
> You should read the postings under "access / freeing memory", I have
> asked a very similar question.
>
> Jan
Thanx i've seen it just too late!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-07-18 8:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-01 0:00 Unchecked_Deallocation robinsoj
1998-12-02 0:00 ` Unchecked_Deallocation Tom Moran
1998-12-03 0:00 ` Unchecked_Deallocation Fanni Kolchina
-- strict thread matches above, loose matches on Subject: below --
2002-07-17 18:07 unchecked_deallocation Felix Engemann
2002-07-17 18:29 ` unchecked_deallocation Larry Hazel
2002-07-17 21:44 ` unchecked_deallocation Jan Prazak
2002-07-18 8:13 ` unchecked_deallocation Felix Engemann
1997-10-22 0:00 Unchecked_Deallocation Scott Barrish
1997-10-22 0:00 ` Unchecked_Deallocation bklungle
1997-10-22 0:00 ` Unchecked_Deallocation Anonymous
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox