My page class is referenced by a lot of LiteralControls?
wyx2000
Posts: 20
It seems one object can not be released because it is still referenced by other objects. I found object of my LinkPage class is referenced by 2000+ objects, several hundred of them are LiteralControl, and several hundred others are Label . They are ASP classes, not my classes, how should I do to remove those references?
Thanks
Thanks
Comments
We can think of two possibilities as to why your classes are not being disposed of. The first is that possibly your classes are putting data into the user session. If that's the case, you may need to wait for ASP .NET to clean this up for you automatically.
The other possibility is much the same with winforms and console applications: that some class has references to a lot of event handler delegates and these may need to be removed from the class before the memory can be reused.
I hope this helps.