praeclarum / Bind

A small but powerful C# library for data binding
Other
204 stars 34 forks source link

Method Unbind doesn't clear the subscription cache (objectSubs) #12

Open vlkam opened 7 years ago

vlkam commented 7 years ago

Solution :

Add to RemoveMemberChangeAction method this line objectSubs.Remove(key);

` internal static void RemoveMemberChangeAction(MemberChangeAction sub) { var key = Tuple.Create(sub.Target, sub.Member); MemberActions subs; if (objectSubs.TryGetValue(key, out subs)) { // Debug.WriteLine ("REMOVE CHANGE ACTION " + sub.Target + " " + sub.Member); subs.RemoveAction(sub);

            objectSubs.Remove(key);
        }
    }`