Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Downgraded Components are not garbage collected #39911

Closed
Labels
P4A relatively minor issue that is not relevant to core functionsarea: upgradeIssues related to AngularJS → Angular upgrade APIsmemory leakIssue related to a memory leakstate: has PR
Milestone
@cryve

Description

@cryve

🐞 bug report

Affected Package

The issue may be caused by package @angular/upgrade

Is this a regression?

No.

Description

I have a hybrid app consisting of a main Angular CLI app that integrates legacy AngularJS templates via custom bundling andUI-Router. When I use a downgraded Angular component in an AngularJS template and toggle the rendering of this component with ng-if, let's say 5 times, then I can find 5 instances of the component in the heap snapshot.
This doesn't happen in a pure AngularJS template nor in a pure Angular template.

🔬 Minimal Reproduction

https://github.com/cryve/angular-downgrade-memory-leak

🌍 Your Environment

Angular Version:

Angular CLI: 11.0.2Node: 12.8.1OS: darwin x64Angular: 11.0.2... animations, cli, common, compiler, compiler-cli, core, forms... platform-browser, platform-browser-dynamic, router, upgradeIvy Workspace: YesPackage                         Version---------------------------------------------------------@angular-devkit/architect       0.1100.2@angular-devkit/build-angular   0.1100.2@angular-devkit/core            11.0.2@angular-devkit/schematics      11.0.2@schematics/angular             11.0.2@schematics/update              0.1100.2rxjs                            6.6.3typescript                      4.0.5

Anything else relevant?
AngularJS code is manually bundled by this script:https://github.com/cryve/angular-downgrade-memory-leak/blob/main/ngx/build.js
The upgrade setup has been inspired by this article:https://www.angulararchitects.io/aktuelles/directly-upgrading-from-angularjs-1-x/

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: upgradeIssues related to AngularJS → Angular upgrade APIsmemory leakIssue related to a memory leakstate: has PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp