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.6 required=5.0 tests=BAYES_40,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80cee3866ad1db7b X-Google-Attributes: gid103376,public From: tconiam@ionet.net (Todd Coniam) Subject: Re: Dangling pointer? Date: 1996/04/19 Message-ID: <4l753u$rj2@ionews.ionet.net>#1/1 X-Deja-AN: 150619136 references: <4l0r36$jte@dewey.csun.edu> content-type: Text/Plain; charset=ISO-8859-1 organization: IONet mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-04-19T00:00:00+00:00 List-Id: 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/