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. C#
  4. Disposing a Dataset

Disposing a Dataset

Scheduled Pinned Locked Moved C#
questionperformancehelp
3 Posts 2 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.
  • F Offline
    F Offline
    fearless stallion
    wrote on last edited by
    #1

    Hi All, I am generating a set of datasets from few DataAdapters, and those generated datasets are referred in another project space as referenced dataset. When i say DataAdapter.Fill(datasetX, "tbl"); it does the task for me. The Memory size of the Exe in the runtime grows from 10mb to 20mb,but once i close the form the size never comes down. Even if i say datasetX.Dispose(); System.GC.Collect(); And i was thinking of using 20 to 30 such datasets but will it not increase the size of my application ? How can I bring down the runtime memory consumption ? How can I Dispose the Dataset ? Please help with this. Thanks in advance

    KSS

    T 1 Reply Last reply
    0
    • F fearless stallion

      Hi All, I am generating a set of datasets from few DataAdapters, and those generated datasets are referred in another project space as referenced dataset. When i say DataAdapter.Fill(datasetX, "tbl"); it does the task for me. The Memory size of the Exe in the runtime grows from 10mb to 20mb,but once i close the form the size never comes down. Even if i say datasetX.Dispose(); System.GC.Collect(); And i was thinking of using 20 to 30 such datasets but will it not increase the size of my application ? How can I bring down the runtime memory consumption ? How can I Dispose the Dataset ? Please help with this. Thanks in advance

      KSS

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      Are you disposing the connection object and DataAdapter object as well? What happens when you open and dispose a bunch of datasets, does the memory size of the exe keep going up? System.GC.Collect(); is probably unnecessary.

      how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

      F 1 Reply Last reply
      0
      • T ToddHileHoffer

        Are you disposing the connection object and DataAdapter object as well? What happens when you open and dispose a bunch of datasets, does the memory size of the exe keep going up? System.GC.Collect(); is probably unnecessary.

        how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

        F Offline
        F Offline
        fearless stallion
        wrote on last edited by
        #3

        Are you disposing the connection object and DataAdapter object as well?

        No i am not disposing them , as they are dragged on to a component. and from that Adapter ->Right Click ->Generate Dataset.then i refer that dataset from my UI project.

        What happens when you open and dispose a bunch of datasets, does the memory size of the exe keep going up?

        No the size of the Exe remains the same.

        how vital enterprise application are for proactive organizations
        leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that
        focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the
        bottom-line. But of course, that's all a "high level" overview of things
        --thedailywtf 3/21/06

        This really is cool but High Level also... :-D Thanks for the answer.

        KSS

        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