{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/4150","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/4150/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/4150/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/4150/events","html_url":"https://github.com/dotnet/coreclr/issues/4150","id":146726994,"number":4150,"title":"Free object immediately rather then using GC when object is null or goes out of scope","user":{"login":"SunnyWar","id":4521425,"avatar_url":"https://avatars.githubusercontent.com/u/4521425?v=3","gravatar_id":"","url":"https://api.github.com/users/SunnyWar","html_url":"https://github.com/SunnyWar","followers_url":"https://api.github.com/users/SunnyWar/followers","following_url":"https://api.github.com/users/SunnyWar/following{/other_user}","gists_url":"https://api.github.com/users/SunnyWar/gists{/gist_id}","starred_url":"https://api.github.com/users/SunnyWar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunnyWar/subscriptions","organizations_url":"https://api.github.com/users/SunnyWar/orgs","repos_url":"https://api.github.com/users/SunnyWar/repos","events_url":"https://api.github.com/users/SunnyWar/events{/privacy}","received_events_url":"https://api.github.com/users/SunnyWar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-07T19:58:14Z","updated_at":"2016-04-07T19:58:14Z","closed_at":null,"body":"I wrote a simple program that allocated a large number of objects, put them in a container, uses them (never passed to another function), then sets them all to null. The container goes out of scope after the function exits.\r\n\r\nLooking at perfmon I see the %Time in GC is very high. The working set grows quite larger. My conclusion is that all these objects are being garbage collected through the normal garbage collection path, even though it's clear, upon setting them to null that they can be freed immediately.\r\n\r\nMy suggestion is that the JIT compiler determine which objects can short-cut the GC process then destroy them immediately."}}