Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: pkg/observe/lib/src/change_notifier.dart

Issue 53743002: introduce ObservableList.listChanges to keep list changes separate from property changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/observe/lib/observe.dart ('k') | pkg/observe/lib/src/change_record.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/change_notifier.dart
diff --git a/pkg/observe/lib/src/change_notifier.dart b/pkg/observe/lib/src/change_notifier.dart
index 133c6c88cb7c9a2ab9e744337045833debcdd10a..54653e9e99115313cbb133b61130bfa845539d16 100644
--- a/pkg/observe/lib/src/change_notifier.dart
+++ b/pkg/observe/lib/src/change_notifier.dart
@@ -40,7 +40,10 @@ abstract class ChangeNotifier implements Observable {
* Override this method to be called when the [changes] are no longer being
* observed.
*/
- void unobserved() {}
+ void unobserved() {
+ // Free some memory
+ _changes = null;
+ }
bool deliverChanges() {
var records = _records;
« no previous file with comments | « pkg/observe/lib/observe.dart ('k') | pkg/observe/lib/src/change_record.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698