Click here to Skip to main content
15,889,429 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: "The feature you are trying to use ..." Error Pin
jszabo17-Oct-16 12:24
jszabo17-Oct-16 12:24 
GeneralRe: "The feature you are trying to use ..." Error Pin
Dave Kreskowiak17-Oct-16 13:10
mveDave Kreskowiak17-Oct-16 13:10 
Question.net freelancer Pin
Member 1278822911-Oct-16 11:06
Member 1278822911-Oct-16 11:06 
AnswerRe: .net freelancer Pin
Dave Kreskowiak11-Oct-16 11:22
mveDave Kreskowiak11-Oct-16 11:22 
AnswerRe: .net freelancer Pin
Eddy Vluggen12-Oct-16 7:05
professionalEddy Vluggen12-Oct-16 7:05 
QuestionNested Components - Winforms Pin
Midi_Mick10-Oct-16 6:47
professionalMidi_Mick10-Oct-16 6:47 
AnswerRe: Nested Components - Winforms Pin
Midi_Mick11-Oct-16 0:24
professionalMidi_Mick11-Oct-16 0:24 
QuestionLife of IDisposable object members Pin
Midi_Mick2-Oct-16 7:25
professionalMidi_Mick2-Oct-16 7:25 
This one's a bit hard to explain. If I have an IDisposable object A, and assign one of its (IDisposable) members to a property in object B, will the garbage collector dispose of Object A when it goes out of scope, yet object B does not. e.g.
C#
class ObjectA {
    public Image ImageA;
}
class ObjectB : IDisposable {
    public Image ImageB;
    otherDisposableStuff;
    public ObjectB() {
       // Loads ImageB
    }
    void Dispose() {
        ImageB.Dispose();
        otherDisposableStuff.Dispose();
    }
} 
ObjectA objA = new ObjectA();

SomeMethod() {
    ObjectB objB = new ObjectB();
    objA.ImageA = objB.ImageB;
}

What I want to know is will the garbage collector dispose of either objB or its otherDisposableStuff while objA remains in scope? (Note I do not manually dispose of objB)
Cheers,

Mick
------------------------------------------------
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.

AnswerRe: Life of IDisposable object members Pin
Nathan Minier3-Oct-16 1:28
professionalNathan Minier3-Oct-16 1:28 
GeneralRe: Life of IDisposable object members Pin
Midi_Mick3-Oct-16 1:41
professionalMidi_Mick3-Oct-16 1:41 
GeneralRe: Life of IDisposable object members Pin
Nathan Minier3-Oct-16 1:46
professionalNathan Minier3-Oct-16 1:46 
QuestionControl Designers Pin
Midi_Mick27-Sep-16 4:02
professionalMidi_Mick27-Sep-16 4:02 
AnswerRe: Control Designers Pin
Gerry Schmitz28-Sep-16 13:26
mveGerry Schmitz28-Sep-16 13:26 
Questioninteroperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 5:44
professionalachimschoen22-Sep-16 5:44 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
NotPolitcallyCorrect22-Sep-16 6:29
NotPolitcallyCorrect22-Sep-16 6:29 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 6:44
professionalachimschoen22-Sep-16 6:44 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
NotPolitcallyCorrect22-Sep-16 7:02
NotPolitcallyCorrect22-Sep-16 7:02 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 22:09
professionalachimschoen22-Sep-16 22:09 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
#realJSOP22-Sep-16 6:41
mve#realJSOP22-Sep-16 6:41 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Gerry Schmitz22-Sep-16 7:12
mveGerry Schmitz22-Sep-16 7:12 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 22:17
professionalachimschoen22-Sep-16 22:17 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Gerry Schmitz24-Sep-16 6:16
mveGerry Schmitz24-Sep-16 6:16 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Bernhard Hiller22-Sep-16 21:02
Bernhard Hiller22-Sep-16 21:02 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Pete O'Hanlon22-Sep-16 21:41
mvePete O'Hanlon22-Sep-16 21:41 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 21:57
professionalachimschoen22-Sep-16 21:57 

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

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