Results 1 to 5 of 5

Thread: [RESOLVED] Quick GDI Memory Disposal Question

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    [RESOLVED] Quick GDI Memory Disposal Question

    Self-taught programmer here... I have some gaps in some of my learning I'm trying to fill. Lately the gaps are in memory management, so forgive the basicness of this question:

    If I declare some sort of GDI object, say a font like this:

    dim F as New Font("Arial", 27, FontStyle.Bold)

    I can dispose it easily when I am done with it using F.Dispose

    But what if I create a font like this?

    SomeButton.Font = New Font("Arial", 27, FontStyle.Bold)

    How do you dispose of something that is created on the fly like this?

    Thanks!
    neef
    Last edited by neef; Jul 14th, 2019 at 02:08 PM.
    Intermediate Level Programmer Extraordinaire

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