Wednesday, July 6, 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, Part, sp, instantiate, Node } from 'cc';
const { ccclass, property } = _decorator;
 
@ccclass('TestPerformance')
export class TestPerformance extends Part {
    @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 exploit cocos creator 3.4.2

I used the reminiscence viewer software to have a look at the interval, the reminiscence enhance shouldn’t be loads. the way you see GFX buffer reminiscence leak?

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

Plainly the issue comes from the fabric reminiscence of backbone. It enhance sluggish however when play recreation very long time it turn out to be bigger. It turns into extra critical in my recreation on account of it getting used a number of backbone created and destroy incessantly.

I exploit script take a look at with sprite node destroy, nevertheless it not enhance 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