Why you should be avoiding using stale pointers
|Top Tutorials||New Tutorials||Submit||Login||Register|
Total Hits: 9331
Total Votes: 89 votes
Category: Delphi/Delphi Misc
Submitted on: 2008-04-16 06:47:23
Submitted By: Shekhar
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. More detail...