CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    VB doesn´t stop eating memory resources!!!

    We have an Active-X control (a custom grid) bound to a recordset.We do it using
    the DataSource property.
    When we attach the recordset to the grid, setting the DataSource property, it works fine, and obviously the memory eaten by the application rises.
    The problem is when we want to detach the recordset.We do:
    rsattached.close
    Set mygrid.Datasource=Nothing

    It works fine, because the data in the grid is lost, BUT the memory is not left at all by the application!!! It only is free when the user closes the form.

    The first time we attach the recordset, VB eats 2Mb.When we close it,the memory eaten stays, it doesn´t go down, BUT when we attach a new recordset again, it eats 2 Mb more!!!!!!

    Can anyone explain this,or give me some known reference in Microsoft KB or does anybody know a solution?


    Thanks in advance




  2. #2
    Guest

    Re: VB doesn´t stop eating memory resources!!!

    After using recordset, close it and set to Nothing.

    MyRecordset.Close
    set MyRecordset = nothing



    Vlad


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

Featured