Information générale
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Network:
Windows 2003 Server
>Boy this section is quiet, I'm beginning to feel like only Viv and me are playing with WPF.
Hi,
Actually it's only you :-{
I'm stuck re-hashing some VFP - probably until the end of the month but after that it should be pretty WPF intensive for me....
> Well at least I finally feel like I'm out of the brain dead phase starting to get a rough idea of what I'm doing. The learning curve on this seemed steeper than most of the languages I've learned. But I'm beginning to really like it, and in some ways it's closer to VFP for me than WinForms was.
>
>This question probably has the same answer for WPF and WinForms.
>
>I'm using a TabControl and using tabControl.Items.Remove(tabItem) to close the content of the tabs.
>
>That should be the last reference to the the TabItem and its content, except for events.
>
>Do I also need to -= remove the events to get the TabItem to be released from memory?
>
>Should I -= the events anyways, or is it unnecessary?
As you suggest I don't think this is a WPF (or even WinForms) specific issue - it's a generalised .NET thing. My understanding is that there is no need to unhook handlers (unless you specifically want to stop handling the event in question). OTOH I can't remember where that 'understanding' came from. :-{
>Is there something else I should be doing to release the TabItem and it's content?
No Dispose() so I'd assume you just let garbage collection take its course..
BTW have you come across any good WPF books? I've got the 'Unleashed' which is OK. Also I seem to remember that Apress (which I generally like) had one due out about now (but I haven't got round to checking whether it's actually available...)
Best,
Viv
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement