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

代理的内存泄露bug #23

Open
narutosu opened this issue Sep 26, 2021 · 0 comments
Open

代理的内存泄露bug #23

narutosu opened this issue Sep 26, 2021 · 0 comments

Comments

@narutosu
Copy link

import * as UE from 'ue'
import {$ref, $unref, $set, argv, on, toManualReleaseDelegate, releaseManualReleaseDelegate} from 'puerts';

/////////////////////////////////////////////////////////////////////////
let world = (argv.getByName("GameInstance") as UE.GameInstance).GetWorld();
let actor = world.SpawnActor(UE.MainActor.StaticClass(), undefined, UE.ESpawnActorCollisionHandlingMethod.Undefined, undefined, undefined) as UE.MainActor;
function ggg(){
let arr = new Array(1000000);
function MutiCast2(i) {
if(arr){}
}
actor.NotifyWithInt.Add(MutiCast2)
actor.NotifyWithInt.Remove(MutiCast2);
}

for(let i=0;i<10;i++){
ggg()
}
actor = null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant