Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6722263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:25:36+00:00 2026-05-26T09:25:36+00:00

To make a very long story short… This is in a large WPF project

  • 0

To make a very long story short… This is in a large WPF project

I have a class “Patient” that implements INotifyPropertyChanged. When I dispose this class I am checking that the PropertyChangedEventHandler is null and if not run it to a ListenerDetector class that logs the listeners so we can track them down and clean the leaks. Patient does have some properties that are bound to WPF elements as well as other objects the use its PropertyChanged to monitor changes.

After disposing everything else, my log result is as follows:

Log: Patient still has the following listener(s) attached:
– System.ComponentModel.PropertyChangedEventManager

Question:
When is the PropertyChangedEventManager created?

  • When Patient is created
  • When WPF binds to Patient property
  • Some other point.

If Patient.PropertyChangedEventHandler is set to null and therefore disconnected from the PropertyChangedEventManager is there any way to recreate the Manager and have it listen to the Patient.PropertyChangedEventHandler again? Please don’t ask why this would happen, that is a point of tension here 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:25:36+00:00Added an answer on May 26, 2026 at 9:25 am

    The PropertyChangedEventManager is created by WPF in order to support binding to any class that implements INotifyPropertyChanged. It’ll be created and used as soon as you bind to any class that implements INotifyPropertyChanged.

    That being said, its an implementation of the WeakEventManager pattern. While it’s still showing a listener attached, realize that this listener is attached using the Weak Event Pattern. This will go away as soon as a full garbage collection occurs, as it’s using weak references to hold the subscription. As such, this particular subscription shouldn’t be the cause of a (long term) memory leak.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Long story short, I have two regex patterns. One pattern matches things that I
To make a long story as short as possible (ignore this paragraph if you
I'm going to try to make a very long story short here. I was
For a very long time, when I have an error handler I make it
I ran into a very weird problem today. Long story short, my function returns
To not make a short story long, my teacher makes us use a MASM.EXE
It's a rather long story but to make it short I need to store
I currently have this very long if statement: if (somesTring != null && !.equals(somestring)
I have a very long query that is essentially an extension of the following:
When I make the spinner with very long text, the spinner button (not drop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.