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

  • Home
  • SEARCH
  • 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 6934809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:00:36+00:00 2026-05-27T12:00:36+00:00

I read Silverlight UI not unsubscribing from PropertyChanged events just now. It was exactly

  • 0

I read Silverlight UI not unsubscribing from PropertyChanged events just now. It was exactly the question I’m having. I tried the experiment proposed by in the answer. And the answer is correct, they are collected upon explicit GC.

However, This result in two more questions:

  1. This seems to be contradicting to these two threads on stackoverflow about Event Handler and GC: 1, 2. Are they wrong?
  2. How is this implemented? I recall there’s something called weak reference in Java. Is it something related?

Here is some clarification of the question:

The eligibity to GC only when publisher cease to exist is common sense. But that common sense contradicts with the experiment in the answer of Silverlight UI not unsubscribing from PropertyChanged events, which proves Silverlight UI’s subscription to PropertyChanged events cease to exist if and only if garbage collection happens. I believe more in facts than common sense. But how could that fact be explained? weakref?

  • 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-27T12:00:37+00:00Added an answer on May 27, 2026 at 12:00 pm

    The answers to the two linked questions are not in contradiction; because an event subscription is a delegate to an instance method, the event publisher maintains an indirect reference to the subscriber, so the subscriber will not be eligible for collection until the publisher is eligible for collection. The second linked answer simply means that the garbage collector is smart enough to handle circular references (since the GC operates on the idea of reachability from a “GC Root” rather than simple reference counting).

    If what you’re asking about is how XAML-based environments like Silverlight or WPF can have the UI elements garbage collected while they’re still bound to nonvisual elements, the answer lies in how XAML binding works.

    At the risk of oversimplifying what is actually a very complex system (the whole of XAML binding), XAML binding does use the WeakReference type on its binding source to allow garbage collection of that object.

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

Sidebar

Related Questions

i've just read a few posts on hiding Silverlight code in some way. Main
I've tried to read article WPF/Silverlight: Step By Step Guide to MVVM but I
Is it possible to access a webcam in Silverlight From what I've read it's
I am trying to read dataSource ad Catalog from <connectionStrings> in web.config in Silverlight
Yesterday I got a question from a collegue about Silverlight's crossdomain access policy mechanism.
If you read the release notes from the Feb 18th release of Silverlight ,
I have read somewhere that Silverlight is subset of WPF , then why triggers
I've read some of WPF/Silverlight controls, and I really liked some of them. One
First I've read loads of posts and sites that recommend going to http://silverlight.net/GetStarted/ to
I am planning to familiarize( read teach ) myself with Silverlight by building an

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.