GC don't understand

Daniel Keep daniel.keep.lists at gmail.com
Wed Nov 15 23:25:21 PST 2006



Nahon wrote:
> Hi.
> 
> I'm developing a web server application using threads and sockets. It's quite
> simple but it throws "Error: Access Violation" and stops responding for
> incoming connections very frequently. When it occurs I have to Ctrl-C the
> server and restart to continue its work. I've put tons of debug info to trace
> the error but I've found no order on where it throws. So for a try I disabled
> the GC and now it works as it should.
> Why does this happen? How could I re-enable the GC (memory consuming is
> increasing by every connection) without having to fear of Access Violation errors?
> 
> Regards,
> Nahon

Access Violations can be caused by a few things.  One of these is
attempting to use a null object, but it doesn't sound like that.  The
other is attempting to use an object that's been deleted.

D's GC should never delete an object you still have a reference to; are
you deleting objects manually?  If so, that could be your problem:
you're deleting an object and then trying to use it again.

It's really the only thing I can think of at the moment; sorry.

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list