Destroy Method

Some objects in JavaLanguage provide a method called destroy(); which sometimes does the following:

DestroyMethod is frequently used because the Java "finalize" is non-deterministic, and may not be called at all (see FinalizationProblem). Some resources are scarce, and waiting for the garbage collector to clean stuff up might take too long.

DotNet calls this Dispose; CeeSharp has language support for calling it...

  using(BusinessObject anObject = new BusinessObject())
  {
    //execute code... When scope leaves the using block, Dispose will be called on your object automatically.
  }


EditText of this page (last edited May 30, 2004) or FindPage with title or text search