Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__vfrag__ references prevent GC of Vue objects #2161

elsassph opened this issue Jan 14, 2016 · 0 comments

__vfrag__ references prevent GC of Vue objects #2161

elsassph opened this issue Jan 14, 2016 · 0 comments


Copy link

@elsassph elsassph commented Jan 14, 2016

Unless the host DOM element is fully removed (from DOM and from references), __vfrag__ references seem to prevent full garbage collection of the Vue objects.

Using Chrome Profiler, after the vm object is destroyed we can still find references through __frag__ between the DOM and the Vue objects:

var data = {
        { title:'Item 1', position:[0, 0] },
        { title:'Item 2', position:[200, 0] },
        { title:'Item 3', position:[0, 100] },
        { title:'Item 4', position:[200, 100] }

Vue.component('tile', {
    props: ["item"],
        <div class="tile" :style="position">
    computed: {
        position: function() {
            var pos = this.item.position;
            return `left:${pos[0]}px; top:${pos[1]}px`;

var app = new Vue({
    el: '#app',
        <div class="grid">
            <tile v-for="item in items" :item="item"/>
    data: data

setTimeout(function() {
    app = null;'destroyed');
}, 2000);
@elsassph elsassph changed the title __vfrag__ references prevent GV of Vue objects __vfrag__ references prevent GC of Vue objects Jan 14, 2016
elsassph pushed a commit to elsassph/vue that referenced this issue Jan 14, 2016
@yyx990803 yyx990803 closed this Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants