Mark Rogers wrote:
> Looking into this in more detail, it seems that if I have my instance of 
> TSynHttpServer (which is derived from TSynTcpServer) set with 
> SpareThreads>0, then threads which do not die (eg by timing out) do not 
> get freed and cause the access violation and a memory leak.
>   

OK, I've got a bit further with this.

It seems that if SpareThreads > 0 then when a thread times out (ie 2
mins after receiving any data) it registers itself in FThreadPool. So
any thread which has not seen data for >2mins before the server shuts
down should clear up properly, anything less than 2 mins and the access
violation and memory leak occur.

If anyone else is using TSynHttpServer and has fixed this I'd love to
hear from you. In the meantime I'm going to live with SpareThreads = 0.

-- 
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0845 45 89 555
Registered in England (0456 0902) at 13 Clarke Rd, Milton Keynes, MK1 1LG

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to