Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Freeing Memory

Freeing Memory

Scheduled Pinned Locked Moved Visual Basic
csharpperformancequestionlearning
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I heard that resource(memory) is freed automatically for you in vb.net but not vb6, so i was wondering how do you do it manually in vb6 ?

    P 1 Reply Last reply
    0
    • L Lost User

      I heard that resource(memory) is freed automatically for you in vb.net but not vb6, so i was wondering how do you do it manually in vb6 ?

      P Offline
      P Offline
      Paul Riley
      wrote on last edited by
      #2

      Set MyObject = Nothing Paul I think there're pieces of me you've never seen - Tori Amos, Tear in Your Hand

      M 1 Reply Last reply
      0
      • P Paul Riley

        Set MyObject = Nothing Paul I think there're pieces of me you've never seen - Tori Amos, Tear in Your Hand

        M Offline
        M Offline
        mikasa
        wrote on last edited by
        #3

        Setting an Object = Nothing does not ALWAYS free the memory in VB6 (this goes for .NET as well). Get familiar with the Objects you are using, if they implement a "Close" or "Dispose" method, ALWAYS use it before Setting your Object = Nothing. For example, watch ADO eat up memory in a VB6 app. However, when you use the Close method, the memory usage goes way down. It takes a little while for the VB6 runtime to clean up the memory references, but it happens.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups