deleting objects caused "Finalization error" when threading

Huang Guan gdxxhg at gmail.com
Sun Jun 29 01:07:32 PDT 2008


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?




More information about the Digitalmars-d mailing list