[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scripting
Eero Pajarre wrote:
> Jorrit Tyberghein wrote:
> >
> >
> > Well not really. For example, errors you can do in C++ but not in Java:
> > - Accidently use memory that has already been deleted but the
> > pointer was not cleared.
>
> But you can use a part of the data structure which should have been
> deleted. For example you may set the left branch of you tree node
> to null, and think you got rid of it, and still access it through
> a different object. (I guess I am comparing this to the use of
> deleted memory, because it has been a long time since I
> last made the "use of deleted memory" error, but somewhat
> shorter time from a problem like this)
Well that's a programming error then but at least it will not
crash your application. i.e. the left branch of the tree will just remain
in memory until the last reference has been removed.
Greetings,
--
==============================================================================
Jorrit.Tyberghein@uz.kuleuven.ac.be, University Hospitals KU Leuven BELGIUM
The labyrinth of Ephebe is ancient and full of one hundred and one amazing
things you can do with hidden springs, razor-sharp knives, and falling
rocks.
-- (Terry Pratchett, Small Gods)
==============================================================================