DataSet object - Is it Garbage Collected after usage in COM+?

Problem: I have implemented Middle-tier COM+ services in .NET. I am having a CLBS architecture for high availability. If I use datasets in the middle-tier, what will happen after the COM+ call (that uses dataset) returns will the dataset object just filled "using Fill()" be garbage collected or will it stay in memory to better serve the next call to the same dataset I got this question because in COM+, the object will be pooled right so, when they are pooled, what happens to he datasets they have accessed

If the dataset object stays in memory, I dont have to implement any caching service to cache this dataset. If its garbage collected, then I need to persist this dataset.




Answer this question

DataSet object - Is it Garbage Collected after usage in COM+?

  • Hendo

    It really depends how you implement/configure the com+ component. By default pooling is false for a ServicedComponent.

    If for example object pooling is enabled and you store the DataSet in a member variable, of course that is not garbaged collected after the com+ call returns.


  • Drake1500

    I believe it will be collected. Pooling does not mean that all the data stays with the object. It means that object does not require an additional instantiation.

  • Haplo_69

    If it's System.GC.Collect ...it's gone...no longer in memory/RAM

    Adamus



  • DataSet object - Is it Garbage Collected after usage in COM+?