Results 1 to 4 of 4

Thread: *resolved* What's wrong with memory usage!!?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    *resolved* What's wrong with memory usage!!?

    I have a simple program with only a list view in it...yesterday when I was running it, it was only using 3 MB of ram, but now when I run it, it uses 14MB of ram (I do garbage collection very often, so it's not because of that)

    why is this like this?!!!
    Last edited by MrPolite; Sep 27th, 2002 at 08:03 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    How do you do Garbage Collection? All you can do is schedule something for Garbage Collection from what I understand. When the VM decides that resources are getting low, it then will reclaim resources. So it doesn't really matter how much ram your using, if you need more, and there is stuff that still hasn't been removed from memory, then the collection process will free the needed resources. It is kind of weird, but it works.

  3. #3
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    I've noticed similar things with a variety of apps with a variety of controls, not just ListView. Seems like Windows FOrms just eats a lot of memory, although it's all tempory memory (minimize your app and watch memory usage go down to zeroish). I haven't worked with any projects big enough to bother me yet, partly because my work is so simply and partly because I have 512MB. Not sure how .NET apps would behave on a system that is tight for memory.

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by hellswraith
    How do you do Garbage Collection?
    well I was forcing one:
    GC.Collect()
    GC.WaitForPendingFinalizers()


    I removed this and I tested my app... I left the app open for like an hour and it works fine....the ram goes high, but it frees the memory oftern. Works fine I guess
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width