From: tconiam@ionet.net (Todd Coniam)
Subject: Re: Dangling pointer?
Date: 1996/04/19
Date: 1996-04-19T00:00:00+00:00 [thread overview]
Message-ID: <4l753u$rj2@ionews.ionet.net> (raw)
In-Reply-To: 4l0r36$jte@dewey.csun.edu
In article <4l0r36$jte@dewey.csun.edu>, kc44097@csun.edu says...
>
>
> What is "dangling pointer",can someone give me a defination and example?
>Please e-mail me kc44097@huey.csun.edu
>
> Thankx
--
A dangling pointer occurs when you:
1. create an object
2. reference it with a pointer (access type)
3. destroy the original object
(the pointer is now pointing to deallocated memory)
If you try to reference the (now deallocated) original object you are using a
dangling pointer and nothing can be guarenteed about what you'll get.
Often you get the original contents. Your best case is an exception, but any
implementation could cause all kinds of errors.
-------------------------------------------------------------------------
Todd Coniam | Member: Team Ada
tconiam@ionet.net | Ada 95 - The international standard in OO languages
-------------------------------------------------------------------------
Check: http://lglwww.epfl.ch/Ada/ Free compiler: http://www.gnat.com/
prev parent reply other threads:[~1996-04-19 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-16 0:00 Dangling pointer? chen
1996-04-16 0:00 ` Robert A Duff
1996-04-19 0:00 ` Todd Coniam [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox