O'Reilly logo

KnockoutJS Web Development by John Farrar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a computed observable

A computed observable provides the following functions:

  • dispose(): This manually disposes the computed observable, clearing all subscriptions to dependencies. This function is useful if you want to stop a computed observable from being updated or want to clean up memory for a computed observable that has dependencies on observables that won't be cleaned.
  • extend(extenders): This applies the given extenders to the computed observable.
  • getDependenciesCount(): This returns the current number of dependencies of the computed observable.
  • getSubscriptionsCount(): This returns the current number of subscriptions (either from other computed observables or manual subscriptions) of the computed observable.
  • isActive(): This returns whether ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required