More correctly, it is the result of dereferencing a nil pointer. In 
Delphi, object variables are pointers that are dereferenced for you.
The object variable/pointer may or may not have pointed to an object 
that may or may not have been freed, but the pointer is now nil.
Doug

hjansenvanrensburg wrote:
> An access violation is NOT due to an instantiation of an object not being 
> freed. Instead, it is due to an attempt to access an object that HAS ALREADY 
> been freed, or that perhaps hasn't been instantiated yet. So, if you did 
> this: MyObject.Free; and you followed that later on with MyObject.Show; then 
> then you will cause an access violation.
>
> Do not set the close action of your MAIN FORM to caFree. When you close your 
> main form, the application will free it. caFree is typically used in MDI 
> (multi document interface) applications, where the child forms are MDI child 
> forms.
>
> You will have to search for an object somewhere in your application which is 
> being referenced after you have already freed it. Perhaps on your main form's 
> OnClose event?
>
> Good luck.
>
>
>
>
>
> ------------------------------------
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [email protected]! Groups Links
>
>
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.238 / Virus Database: 270.11.28/2022 - Release Date: 03/25/09 
> 07:16:00
>
>   

  ----------


  ----------


No virus found in this outgoing message.
Checked by AVG - www.avg.com 
Version: 8.0.238 / Virus Database: 270.11.28/2022 - Release Date: 03/25/09 
07:16:00


[Non-text portions of this message have been removed]

Reply via email to