deleting objects caused "Finalization error" when threading
Frank Benoit
keinfarbton at googlemail.com
Sun Jun 29 02:18:37 PDT 2008
Huang Guan schrieb:
> Hi, I am still writing my Web Server program and I still can not go through the problems that might be caused by GC. I often catch the exception "Finalization error" when a connection is being deleted.
>
> As I have been accustomed to deleting objects when I don't use it( Want to release memory quickly ), I wrote many "delete" statements. I think the problem above happens when a thread is deleting a object, but which is at the moment used by another thread, then it causes the "Finalization error" exception.
>
> I don't know whether I am right or not.
> But as I replaced the "delete obj" instead of "obj = null", the problem seldom happened.
>
> Do you have any ideas?
>
The 'Finalization error' is thrown, if a destructor has thrown an
exception, which is not allowed.
More information about the Digitalmars-d
mailing list