Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 742879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:47:55+00:00 2026-05-14T08:47:55+00:00

What is the impact of creating variables using: Dim ds as New DataSet ds

  • 0

What is the impact of creating variables using:

Dim ds as New DataSet
ds = GetActualData()

where GetActualData() also creates a New DataSet and returns it?
Does the original empty DataSet that was ‘New’ed just get left in the Heap?

What if this kind of code was in many places? Would that affect the ASP.NET process and cause it to recycle sooner?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:47:55+00:00Added an answer on May 14, 2026 at 8:47 am

    The impact is that you are creating more objects than you need to.

    The unused object will be left on the heap, so it will need to be garbage collected eventually. If you do this a lot, it will result in the garbage collector having to run more frequently.

    Compared to the real work done it should however be minimal, i.e. actually populating a data set is so much more work that the extra unused object is almost negligible.

    It won’t cause the ASP.NET process to recycle sooner, as object throughput / GC frequency is not a factor.

    Eventhough the impact is minimal, the code should of course not create those unused objects. Perhaps more important than the performance is that the code doesn’t really correspond with what you want to accomplish. Every little discrepancy like that makes the code harder to maintain.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the impact on memory usage of using lots of iterators in C#?
My SQL table has 2 fields that impact my problem: Priority as real, and
Just wondering about the performance impact of copying very large php variables. For example
I am creating a simple(ish) website for one of my iPhone apps using the
I have lots of global read only strings (around 100) that I am using
In the app I'm developing I'm creating several objects that each have the following
What is the performance impact of using Page.LoadControl in ASP .NET to load User
With the new File ActionResult, I was thinking about creating a controller to display
How costly (performance impact) is creating subcontainers in Unity 2.0? The scenario is for
I am creating a facebook applicatioon using PHP-SDK and GRAPH-API. I feel like saving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.