Tuesday, July 5, 2022
HomeGame DevelopmentGFX Buffer Reminiscence leak when destroy backbone node - Cocos Creator

GFX Buffer Reminiscence leak when destroy backbone node – Cocos Creator


I write easy part to check backbone on net:

import { _decorator, Element, sp, instantiate, Node } from 'cc';
const { ccclass, property } = _decorator;
 
@ccclass('TestPerformance')
export class TestPerformance extends Element {
    @property({kind: Node})
    nodeRender = null;

    replace(dt)
    {
        let node = instantiate(this.nodeRender);
        this.node.addChild(node);
        node.lively = true;
        setTimeout(()=>{
            node.lively = false;
            node.getComponent(sp.Skeleton).destroy();
            node.destroy();
        }, 200);
    }
}

When take away backbone node, gfx reminiscence buffer doesn’t lower. Please see my video.


Which model of creator are you utilizing?

I take advantage of cocos creator 3.4.2

I used the reminiscence viewer device to take a look at the interval, the reminiscence improve is just not rather a lot. the way you see GFX buffer reminiscence leak?

I see profiler textual content on bottom-left sport concern and profiler of chrome as you used. I write some code custome engine to check right here

It appears that evidently the issue comes from the fabric reminiscence of backbone. It improve gradual however when play sport very long time it develop into bigger. It turns into extra critical in my sport as a consequence of it getting used loads of backbone created and destroy ceaselessly.

I take advantage of script take a look at with sprite node destroy, however it not improve as backbone node.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments