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.
 
Back
Top