![]() |
clsSocket verrs System - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: clsSocket verrs System (/showthread.php?tid=2141) |
clsSocket verrs System - William - 20-09-2008 I just got a out of memory error on this line of code Code: Call mvarSocket.Write(dbytes, thenShutdown) Code: Public Sub WriteBytes(dbytes() As Byte, Optional thenShutdown As Boolean) And WriteBytes are called from a timer with the interval 3 for some reason: Code: Private Sub Timer1_Timer() Re: clsSocket verrs System - JokeofWeek - 20-09-2008 You have a memory leak somewhere. Memory leaks can be caused by loads of things, so you might want to check your source for any obvious ones. One possible memory leak which I just found out the other day is exiting a sub/function while you are still in a with statement, for example : Code: With Map Another tip would be to download a code profiler (such as this one : http://www.aivosto.com/project/project.html). However, many of these are expensive, so good luck finding a free one. I don't remember if CodeSMART finds memory leaks, if it does, you can use that ![]() Re: clsSocket verrs System - William - 20-09-2008 Hum, I guess I need to do this.. *boring* Re: clsSocket verrs System - JokeofWeek - 20-09-2008 William Wrote:Hum, I guess I need to do this.. *boring* Aha yeah, it's definitely boring looking for memory leaks. I just checked out CodeSMART and it does give you some memory leaks, so you can try that if you want, might save you lots of time :wink: Plus it optimizes most of your code anyways, which is always useful ![]() Re: clsSocket verrs System - William - 20-09-2008 Im not gonna let CodeSmart fuck up my code by changing things. Can that really be trusted? Re: clsSocket verrs System - William - 20-09-2008 I got a message on the computer saying my virtual memory was low. Re: clsSocket verrs System - Robin - 20-09-2008 Delete your porn. Need more memory. Re: clsSocket verrs System - William - 20-09-2008 Robin Wrote:Delete your porn. Need more memory.It's my server computer, it uses Windows Server 2003 and rarely has anything fun on it. Except my awesome server. Re: clsSocket verrs System - JokeofWeek - 20-09-2008 Out of Memory typically means out of system memory A.K.A. you're using too much Ram. Like I said, your server has a memory leak. Don't worry, you can turn off some things in CodeSMART and you can also make it so it only leaves a suggestion (in a comment) on what the problem is and how to fix it. EDIT: Sorry about that, meant CodeFixer all along, not CodeSMART. Here's a link : http://www.pscode.com/vb/scripts/ShowCo ... 7&lngWId=1 |