Question About Memory Management

  • Thread starter Thread starter Jim Bayers
  • Start date Start date
J

Jim Bayers

I'm new to asp.net. I'm using string builder to put together a very large
sql statement. I'd like to store the statement as a stored procedure, but
I don't have the rights. Anyway, my guess is while the stringbuilder
variable is alive, it takes up a big chunk of memory. How do you get rid
of the stringbuilder variable? I'd like to get rid of it as soon as I'm
done with it.
 
Jim Bayers said:
I'm new to asp.net. I'm using string builder to put together a very large
sql statement. I'd like to store the statement as a stored procedure, but
I don't have the rights. Anyway, my guess is while the stringbuilder
variable is alive, it takes up a big chunk of memory. How do you get rid
of the stringbuilder variable? I'd like to get rid of it as soon as I'm
done with it.

The garbage collector will collect the object some time after it's no
longer referenced. Basically, don't worry about it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top