NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 36 37 38 39 40 … 93 Next »
More On Memory Management

 
  • 0 Vote(s) - 0 Average
More On Memory Management
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#1
2008-01-09, 12:03 AM
Today I'm officially taking off from my memory management investigations. I need to catch up on some sleep.

But I'd like to toss some comments out there to get a feel if what I'm seeing is normal and can be ignored, or a cause for concern.

sub: I'm seeing several (and by 'several' I mean 'tens of thousands') undisposed instances of System.Windows.Forms.WindowsFormSynchronizationContext objects. About 60 a second. They are being destroyed and collected in gc0, but are ending up in the "undisposed" column. They don't seem to be taking up much space, but there sure is an awful lot of them! Is this normal?

Anybody: There are a number of bitmaps and associated graphics objects (System.Drawing.Bitmap, .Graphics, and .StringFormat most notably) that are also ending up as undisposed. Undisposed bitmaps goes up sharply if I wiggle the mouse around while a popup is active. The same behaviour does not occur if there is no popup going. There is an increase in Private Bytes associated with this wiggling, although it's difficult to get a precise handle on how many. Call it, roughly, 150,000 bytes per two second wiggle session.

A G2 collect doesn't collect them, which I'd expect.

Opening and closing a popup with no controls, just a "PopupBackground" Placement, leads to precisely one undisposed bitmap, again with an associated increase in private bytes.

Again, maybe this normal and I'm chasing down the wrong tree (to shamelessly mix metaphors), but it's suspicious enough for me to bring it up here for others to consider. Should I, somehow, be disposing of the "PopupBackgroud" bitmap somewhere?

JavaWiz: I did find one memory leak in your UiTools, but, honestly, I don't think it would account for much more than a few dozen bytes, so I'm not especially panicking over it.
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,673
Threads: 767
Joined: Nov 2003
#2
2008-01-09, 12:07 AM
Quote:sub: I'm seeing several (and by 'several' I mean 'tens of thousands') undisposed instances of System.Windows.Forms.WindowsFormSynchronizationCon text objects. About 60 a second. They are being destroyed and collected in gc0, but are ending up in the "undisposed" column. They don't seem to be taking up much space, but there sure is an awful lot of them! Is this normal?
I have no idea what they are. Its most likely something .net is using behind the scenes. I cant say I've ever noticed them or any problem steming from their existence.

Quote:Anybody: There are a number of bitmaps and associated graphics objects (System.Drawing.Bitmap, .Graphics, and .StringFormat most notably) that are also ending up as undisposed. Undisposed bitmaps goes up sharply if I wiggle the mouse around while a popup is active. The same behaviour does not occur if there is no popup going. There is an increase in Private Bytes associated with this wiggling, although it's difficult to get a precise handle on how many. Call it, roughly, 150,000 bytes per two second wiggle session.

A G2 collect doesn't collect them, which I'd expect.

Opening and closing a popup with no controls, just a "PopupBackground" Placement, leads to precisely one undisposed bitmap, again with an associated increase in private bytes.

Again, maybe this normal and I'm chasing down the wrong tree (to shamelessly mix metaphors), but it's suspicious enough for me to bring it up here for others to consider. Should I, somehow, be disposing of the "PopupBackgroud" bitmap somewhere?
You'd probably need to post a sample project so I could look into it. Its hard to guess what exactly you're doing.
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#3
2008-01-09, 06:54 AM
sub Wrote:I have no idea what they are. Its most likely something .net is using behind the scenes. I cant say I've ever noticed them or any problem steming from their existence.

I won't worry about them then. From my brief bit of reading on them, the appear to be used to make it easier updating the UI from a non-UI thread. So presumably .NET is creating one for each render.

They don't seem to be taking any space -- and at 100K of them an hour, we would notice if they were -- so I'll file them under 'ignore'.

sub Wrote:You'd probably need to post a sample project so I could look into it. Its hard to guess what exactly you're doing.

OK, I'm going to take a break from the whole memory management thing for a bit before I turn into a puddle. I'll then see if I can make a The World's Smallest Plugin to go with my World's Smallest Popup, since I'd really appreciate the extra eyes on it.

I'll inflict it on JavaWiz too, since he offered to take a look; a move I'm sure he's going to regret.

But not for a couple days.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Images in lists using a lot of memory cncb 4 4,000 2015-11-12, 12:02 AM
Last Post: sub
  Resource management InVermont 4 2,009 2010-08-12, 06:12 PM
Last Post: InVermont
  What SCM (Source Control Management) system do you use? JavaWiz 3 2,028 2008-08-19, 07:28 PM
Last Post: Manderson
  Memory management - controls and popups JavaWiz 2 1,911 2008-01-06, 02:48 AM
Last Post: JavaWiz
  tracking down high memory usage in skiptool pastro 32 8,153 2007-12-16, 10:40 PM
Last Post: JavaWiz
  Skiptool memory leak Koenie 0 1,095 2007-11-30, 09:59 AM
Last Post: Koenie
  pluginHelper.ReturnToMainMenu(); throws System.OutOfMemoryException: Out of memory. reven 6 2,559 2006-02-21, 08:13 PM
Last Post: reven
  MusicPanel: memory leak?? psycik 3 1,861 2006-01-12, 06:20 PM
Last Post: reven
  Power Management Plugin colin 12 6,207 2005-09-30, 02:55 AM
Last Post: colin
  Conflict Management KingArgyle 0 1,519 2004-12-10, 02:30 PM
Last Post: KingArgyle

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode