List Info

Thread: SV: Creating disposible object




SV: Creating disposible object
user name
2006-08-03 19:04:09
is anyone counting? how many times has the kraken been
unleashed?
 
Anyway I think the topic is pretty boring by now, but if
anyone feel
uncertain in any way, please read this very good blog from
Joe Duffy.
 
http:/
/www.bluebytesoftware.com/blog/PermaLink,guid,88e62cdf-5
919-4ac7-bc33-20c06ae539ae.aspx
 
Best regards,
Daniel Petersson
 
Daniel.Peterssoncefalo.se
+46 (0)70-1815724

________________________________

Från: Discussion of development on the .NET platform using
any managed language genom Vince P
Skickat: to 2006-08-03 18:35
Till: DOTNET-CLRDISCUSS.DEVELOP.COM
Ämne: Re: [DOTNET-CLR] Creating disposible object



Uh oh.. You've unleashed the Disposible vs GC Kraken.


> -----Original Message-----
> From: Discussion of development on the .NET platform
using
> any managed language [mailtoOTNET-CL
RDISCUSS.DEVELOP.COM]
> On Behalf Of Bradley, Peter
> Sent: Thursday, August 03, 2006 10:41
> To: DOTNET-CLRDISCUSS.DEVELOP.COM
> Subject: Re: [DOTNET-CLR] Creating disposible object
>
> C# is not C, or even C++ 
>
> It's much more like Java in this respect.  Jobs like
this are
> the domain of the Garbage Collector.  There is a
method,
> Dispose() that you can call, but I've not come across
a
> situation where I've had to do that, yet.  The Garbage
> Collector calls it eventually, anyway.
>
> HTH
>
>
> Peter
>
>
> -----Original Message-----
> From: Discussion of development on the .NET platform
using
> any managed language [mailtoOTNET-CL
RDISCUSS.DEVELOP.COM]
> On Behalf Of Vince P
> Sent: 03 August 2006 16:35
> To: DOTNET-CLRDISCUSS.DEVELOP.COM
> Subject: [DOTNET-CLR] Creating disposible object
>
> I have a theory question.
>
> Lets say I have a class that has a method that returns
a new DataSet:
>
> public DataSet GetData();
>
> I'll have no control over the DataSet being disposed. 
As an
> object creator is it my concern that the object I
created
> eventually gets disposed or should I not care and trust
that
> the consumer of this method will do the right thing?
>
> The only alternative I can think of is this
>
> public void GetData(ref DataSet);
>
> in that case, the consumer has to create his DataSet
and I don't.
> Emotionally it makes me feel like I'm not littering.
>
> What's the right way to go?
>
>
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com


===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com




===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )