Jambhalheart Posted December 7, 2011 Report Share Posted December 7, 2011 how to use dispose method for memory occupied by a DataSet ds.Dipose() // is marshallbyvaluecomponent and hence it wil not clear memory occupied ds=null; // means it just references dataset to null but it also doesn't clear memory occupied then, how to use dispose method (of IDisposable Interface) to clear memory occupied by dataset ??? anybody help plsss Link to comment Share on other sites More sharing options...
galigannarao Posted December 7, 2011 Report Share Posted December 7, 2011 Oka class teesukoni example chebuta baa. for example nee Daggara class A unte, now implement iDisposable for that. Implement chesaka oka destructor raasi Indulo nyvvu aa class lo create chese objects dispose chey. So aa class scope ayipogane autimaticga destructor call ayyi objects free ayipotayi Link to comment Share on other sites More sharing options...
Jambhalheart Posted December 7, 2011 Author Report Share Posted December 7, 2011 [quote name='galigannarao' timestamp='1323272301' post='3158933'] Oka class teesukoni example chebuta baa. for example nee Daggara class A unte, now implement iDisposable for that. Implement chesaka oka destructor raasi Indulo nyvvu aa class lo create chese objects dispose chey. So aa class scope ayipogane autimaticga destructor call ayyi objects free ayipotayi [/quote] chesaanu mama, kaani its not working.. for ex: I wrote like this in my destructor. if (_dataset!= null) dataset.Dispose(); // but memory occupied by dataset is not getting cleared up. dataset memory ela release cheyalo code oka saari evvu mama pls Link to comment Share on other sites More sharing options...
katharnak Posted December 7, 2011 Report Share Posted December 7, 2011 bump Link to comment Share on other sites More sharing options...
galigannarao Posted December 7, 2011 Report Share Posted December 7, 2011 [quote name='Maddy_Rulez' timestamp='1323287469' post='3160154'] chesaanu mama, kaani its not working.. for ex: I wrote like this in my destructor. if (_dataset!= null) dataset.Dispose(); // but memory occupied by dataset is not getting cleared up. dataset memory ela release cheyalo code oka saari evvu mama pls [/quote]how are you coming to know the memory is cleared or not. Clr nullify the object and wait for the GC action Link to comment Share on other sites More sharing options...
Jambhalheart Posted December 8, 2011 Author Report Share Posted December 8, 2011 [quote name='katharnak' timestamp='1323288182' post='3160218'] bump [/quote] Link to comment Share on other sites More sharing options...
Jambhalheart Posted December 8, 2011 Author Report Share Posted December 8, 2011 [quote name='galigannarao' timestamp='1323288970' post='3160265'] how are you coming to know the memory is cleared or not. Clr nullify the object and wait for the GC action [/quote] I m checking in task manager under memory usage , so for every action or event memory is getting increased not decreasing... edaina code vunte evvu mama, for disposing dataset and releasing dataset memory.... google lo search chesthune vunna, kaani no solution.... Link to comment Share on other sites More sharing options...
galigannarao Posted December 8, 2011 Report Share Posted December 8, 2011 [quote name='Maddy_Rulez' timestamp='1323356161' post='1301113644'] I m checking in task manager under memory usage , so for every action or event memory is getting increased not decreasing... edaina code vunte evvu mama, for disposing dataset and releasing dataset memory.... google lo search chesthune vunna, kaani no solution.... [/quote]phone nundi dbing evening istale Link to comment Share on other sites More sharing options...
htnamus Posted December 8, 2011 Report Share Posted December 8, 2011 [img]http://www.andhrawatch.com/gifs/var/thumbs/Brahmi-Gifs/106kchl.gif?m=1321424381[/img]evado okadu helf seyandi ..ninati nundi kotteskuntundu[img]http://www.andhrawatch.com/gifs/var/thumbs/Brahmi-Gifs/106kchl.gif?m=1321424381[/img] Link to comment Share on other sites More sharing options...
Jambhalheart Posted December 8, 2011 Author Report Share Posted December 8, 2011 [quote name='HS' timestamp='1323357958' post='1301113759'] [img]http://www.andhrawatch.com/gifs/var/thumbs/Brahmi-Gifs/106kchl.gif?m=1321424381[/img]evado okadu helf seyandi ..ninati nundi kotteskuntundu[img]http://www.andhrawatch.com/gifs/var/thumbs/Brahmi-Gifs/106kchl.gif?m=1321424381[/img] [/quote] hey, neeku kooda .net vaachu kadha,evado enduku nuvve help cheyochu kadha, evaranna seppandi ra babu [img]http://i40.tinypic.com/bi2tqc.gif[/img] Link to comment Share on other sites More sharing options...
Jambhalheart Posted December 9, 2011 Author Report Share Posted December 9, 2011 lift evadanna cheppi punyam kattukondi ra babu Link to comment Share on other sites More sharing options...
htnamus Posted December 9, 2011 Report Share Posted December 9, 2011 [url="http://social.msdn.microsoft.com/forums/en-US/clr/thread/fce08a02-f3dd-4827-82ee-1b4b2309fd80"]http://social.msdn.microsoft.com/forums/en-US/clr/thread/fce08a02-f3dd-4827-82ee-1b4b2309fd80[/url] link by gannarao ..db access leka naku gtalk lo pm sesadu Link to comment Share on other sites More sharing options...
htnamus Posted December 9, 2011 Report Share Posted December 9, 2011 [font=arial, sans-serif][size=3][left]ila kooda cheyochu dataset disposing ani seppu[/left][/size][/font][/left][font=arial, sans-serif][size=3][left]using(DataSet MyDataSet = new DataSet()) { .... }[/left][/size][/font][/left] Link to comment Share on other sites More sharing options...
Jambhalheart Posted December 9, 2011 Author Report Share Posted December 9, 2011 [quote name='HS' timestamp='1323441503' post='1301119045'] [left]ila kooda cheyochu dataset disposing ani seppu[/left] [/left][left][font=arial, sans-serif][size=3]using(DataSet MyDataSet = new DataSet())[/size][/font][/left] [font=arial, sans-serif][size=3]{[/size][/font] [font=arial, sans-serif][size=3] ....[/size][/font] [font=arial, sans-serif][size=3]}[/size][/font] [/left] [/quote] ok bro... I have code like this... try { DataSet ds1 = Presenter.FetchData();// gets data from WCF service DataSet ds2 = Presenter.FetchData2();// gets data from WCF service DataSet ds3 = Presenter.FetchData3();// gets data from WCF service } catch(Exception ex) { } finally { ds1.dispose(); // I m trying to dispose like this but not working... ds1=null; ds2.dispose(); ds2=null; ds3.dispose(); ds3=null; } I will try that code , i will let u know the result... thanks to galigannarao and u for code.. Link to comment Share on other sites More sharing options...
Recommended Posts