Shared Tutorials

Tutorials Shared by the Internet Community
Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Basic Detail

Why you should be avoiding using stale pointers

This unit, of course, does nothing to the VCL, so you can still get stale pointers back from the VCL...
http://www.esanu.name/delphi/Object%20Pascal/Pointers/Avoiding%20using%20stale%20pointers.html
  • Total Hits: 16977

  • Average Rating :
    Tutorial RatingTutorial RatingTutorial RatingTutorial RatingTutorial RatingTutorial Rating

  •  

  • Total Votes: 144 votes

  • Average Rating: 3.81 out of  5

  • Category: Delphi/Misc

  • Set as Favorite

Description:

I've written a very simple unit, and devised some simple methods, to help prevent the usage of stale pointers. My biggest recommendation is to add an 'initialization' section to ALL UNITS WHICH CONTAIN POINTER OR OBJECT VARIABLES and set all the pointers (object variables are really pointers too) to nil. This will ensure that the pointers are all nilified before they are ever used.

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 38.19%  55
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.42%  15
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.81%  17
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 11.11%  16
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 28.47%  41

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.





Advertisements
Advertisements