c# - ASP.Net/SQL: After cancelling query the memory isn't decreasing (DataBoundControl.PerformSelect) -


in asp.net 2.0 production environment have aspx queries kind of query's sql2005 database. queries take while added cancel button.

in code opening connection , after call command.executereader(). bind gridview.

in cancel button click call command.cancel(), dispose command, connection , datareader. , close connection.

after code executed see in sql profiler query cancelled. w3wp.exe still using lot of memory.

to test wrote query returns lot of data. in 2 seconds cancell , see memory increased 250mb 2gb. after while memory isn't decreased.

i've used jetbrains dottrace memory 3.5 see what's going on memory. see 66,6% of memory in use databoundcontrol.performselect. microsoft says "the performdatabinding method called after data retrieved bind data elements of data-bound control." not data retrieved, call cancelled. happens , why memory not released?

anyone idea going on or/and how solve this?

just because dispose resource doesnt mean framework going give memory. in fact, server version of framework retain allocated memory space later reuse.

how garbage collection works in .net

a useful blog understanding internals of garbage collection , performance

from same blog, see block after third note.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -