Bitmap

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jerry chapman

    #1

    Bitmap

    I have program that creates a new bitmap each time I display a new image.
    The code follows:
    myBitmap = new Bitmap(cols,row s);

    While I was running it I received a warning about virtual memory being low.
    Was that because I didn't delete the old bitmap before I created a new one?
    If so, how do I delete the old bitmap?




  • Bob Powell [MVP]

    #2
    Re: Bitmap

    Bitmap.Dispose ought to do it for you...

    --
    Bob Powell [MVP]
    C#, System.Drawing

    The November edition of Well Formed is now available.
    Learn how to create Shell Extensions in managed code.


    Answer those GDI+ questions with the GDI+ FAQ


    Read my Blog at http://bobpowelldotnet.blogspot.com

    "jerry chapman" <jerryc314@worl dnet.att.net> wrote in message
    news:Lm8yb.3573 30$0v4.19137404 @bgtnsc04-news.ops.worldn et.att.net...[color=blue]
    > I have program that creates a new bitmap each time I display a new image.
    > The code follows:
    > myBitmap = new Bitmap(cols,row s);
    >
    > While I was running it I received a warning about virtual memory being[/color]
    low.[color=blue]
    > Was that because I didn't delete the old bitmap before I created a new[/color]
    one?[color=blue]
    > If so, how do I delete the old bitmap?
    >
    >
    >
    >[/color]


    Comment

    Working...