| Delphi .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280) |
Freeing a TList
If there is any possibility of the freeing code being called re-entrantly, make sure to store a nil in the list before freeing the object; your code should look like this:
Otherwise, the list would contain an invalid pointer. Even if you are
not using multi-threading, Delphi has a few places where it is
re-entrant.
Comments:
| |||||||||||||||||||||||