Click here to Skip to main content
       

C#

 
GeneralRe: GridView FindControl LINQ Update PinmemberRickSharp14-Feb-13 10:31 
GeneralRe: GridView FindControl LINQ Update PinmemberRickSharp14-Feb-13 13:28 
QuestionC# Cannot access a disposed object Pinmemberclassy_dog13-Feb-13 8:06 
AnswerRe: C# Cannot access a disposed object PinprotectorPete O'Hanlon13-Feb-13 8:13 
AnswerRe: C# Cannot access a disposed object Pinmemberjschell13-Feb-13 10:15 
QuestionIDisposable spread PinmemberOrjan Westin13-Feb-13 2:45 
AnswerRe: IDisposable spread PinmentorDaveyM6913-Feb-13 4:52 
AnswerRe: IDisposable spread PinmentorKeith Barrow13-Feb-13 5:13 
Orjan Westin wrote:

When reading about IDisposable, I get the impression that the consensus is that once you introduce it, everything that's even heard about it need to be made IDisposable too. Can this really be correct?

No, otherwise the whole framework would implement it.
 
Orjan Westin wrote:
Would Model have to be IDisposable?

No, what you have is perfectly reasonable.
 
What can happen is that in taking control of when an object is disposed, it results in the impulse to chain IDisposable all the way up calling classes. Really you you only need to implement IDisposable where it makes sense: e.g. for memory performance or objects interacting with IO of some sort. As an example, I often write repository classes for EF/Linq TO SQL as the Datacontext is IDisposable and I want to pass the control of the datacontext's disposal up to the repository's controlling class I make the repository IDisposable but the calling class generally uses the using statement, or explicitly calls the destructor depending on the operations I am actually performing against the backing store.

GeneralRe: IDisposable spread PinmemberPIEBALDconsult13-Feb-13 17:46 
GeneralRe: IDisposable spread PinmemberN a v a n e e t h13-Feb-13 18:59 
GeneralRe: IDisposable spread PinmemberOrjan Westin13-Feb-13 22:33 
AnswerRe: IDisposable spread PinmemberN a v a n e e t h13-Feb-13 18:56 
AnswerRe: IDisposable spread PinmemberBobJanova13-Feb-13 23:54 
Questionpropertygrid double click events Pinmemberjone.cunha13-Feb-13 0:56 
AnswerRe: propertygrid double click events PinmvpRichard MacCutchan13-Feb-13 1:14 
GeneralRe: propertygrid double click events Pinmemberjone.cunha13-Feb-13 1:24 
GeneralRe: propertygrid double click events PinmvpRichard MacCutchan13-Feb-13 1:44 
GeneralRe: propertygrid double click events Pinmemberjone.cunha13-Feb-13 1:53 
GeneralRe: propertygrid double click events PinmvpRichard MacCutchan13-Feb-13 3:16 
GeneralRe: propertygrid double click events Pinmemberjone.cunha13-Feb-13 4:45 
GeneralRe: propertygrid double click events PinmvpRichard MacCutchan13-Feb-13 5:38 
GeneralRe: propertygrid double click events Pinmemberjone.cunha13-Feb-13 7:32 
QuestionEnevts in MVC application. Need some Help. Pinmemberplywoods12-Feb-13 21:09 
QuestionHow to determine whether the given geo code in within geo fence or not? PinmemberVijay Kanda12-Feb-13 20:57 
AnswerRe: How to determine whether the given geo code in within geo fence or not? PinprotectorPete O'Hanlon12-Feb-13 23:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140814.1 | Last Updated 20 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid