Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is a common cause of a memory leak in an Angular component?

  1. A Using the async pipe
  2. B Subscribing to a long-lived observable without unsubscribing
  3. C Using OnPush change detection
  4. D Declaring too many inputs
Answer

Subscribing to a long-lived observable without unsubscribing

Router events, form valueChanges, intervals and root service subjects never complete on their own, so the subscription keeps the component alive.

All Angular MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as