Components: Leak Memory in mattooltip

Created on 12 Aug 2018  路  4Comments  路  Source: angular/components

Bug:

Leak Memory in mattooltip

What is the expected behavior?

Memory Release

What is the current behavior?

After mouse over control attach to matooltip

What are the steps to reproduce?

After mouse over control

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

angular 6.0.7 and material 6.3.2

Is there anything else we should know?

in code file tooltip.ts used code
_isHandset: Observable<BreakpointState> = this._breakpointObserver.observe(Breakpoints.Handset);

and used this property in html but not unsubscibe in ts file

similar code unsubscripe in snackbar is correct

this._breakpointObserver.observe(Breakpoints.Handset).pipe( takeUntil(overlayRef.detachments().pipe(take(1))) ).subscribe(state => { if (state.matches) { overlayRef.overlayElement.classList.add('mat-snack-bar-handset'); } else { overlayRef.overlayElement.classList.remove('mat-snack-bar-handset'); } });

Most helpful comment

It should unsubscribe, but actually I've got the same memory leak.
And it is not reproduced in latest material demo app.
Is it already fixed?
@sorterir could you clarify, why you've closed the issue?
Thank you

All 4 comments

The _isHandset observable is used together with the async pipe which means that it'll unsubscribe when the component is destroyed.

I have leak memory after destroyed component .
I Get Material source from Git and remove this property and after rebuild material source leak memory resolve and memory Released ;

leakmemory

It should unsubscribe, but actually I've got the same memory leak.
And it is not reproduced in latest material demo app.
Is it already fixed?
@sorterir could you clarify, why you've closed the issue?
Thank you

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RoxKilly picture RoxKilly  路  3Comments

Miiekeee picture Miiekeee  路  3Comments

dzrust picture dzrust  路  3Comments

crutchcorn picture crutchcorn  路  3Comments

constantinlucian picture constantinlucian  路  3Comments