Search found 2 matches

by shaojun
Thu Jun 17, 2021 5:42 am
Forum: Using .NET Memory Profiler
Topic: Console application Main function has a reference which prevent object to be GCed
Replies: 3
Views: 1169

Re: Console application Main function has a reference which prevent object to be GCed

I updated the post as I found sth seem related to `async Main`. the FdcServerHostApp is the one should be in heap for only one instance, but now there're always two no matter how many times I hit the 're-create'. I'm using Release build, and the snap was collected at the app ran to last line of 'App...
by shaojun
Fri Jun 11, 2021 9:24 am
Forum: Using .NET Memory Profiler
Topic: Console application Main function has a reference which prevent object to be GCed
Replies: 3
Views: 1169

Console application Main function has a reference which prevent object to be GCed

Hi, I'm using .NET CORE 3.1, console application. The app has a feature like hot reload, that each time user hit 'reload', plug-in class get re-create (instantiated) and re-run(call a start function of it), and, the old plug-in class instance should be GCed. The problem now is, I hit 'reload' many t...