{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/4435","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/4435/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/4435/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/4435/events","html_url":"https://github.com/aspnet/Mvc/issues/4435","id":147086805,"number":4435,"title":"Many unused instances of ModelErrorCollection during model validation","user":{"login":"DavidObando","id":950290,"avatar_url":"https://avatars.githubusercontent.com/u/950290?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidObando","html_url":"https://github.com/DavidObando","followers_url":"https://api.github.com/users/DavidObando/followers","following_url":"https://api.github.com/users/DavidObando/following{/other_user}","gists_url":"https://api.github.com/users/DavidObando/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidObando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidObando/subscriptions","organizations_url":"https://api.github.com/users/DavidObando/orgs","repos_url":"https://api.github.com/users/DavidObando/repos","events_url":"https://api.github.com/users/DavidObando/events{/privacy}","received_events_url":"https://api.github.com/users/DavidObando/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-09T04:13:52Z","updated_at":"2016-04-09T04:13:52Z","closed_at":null,"body":"Class `ModelStateDictionary` initializes a root `ModelStateNode` and then creates new child nodes during validation of a model. Class `ModelStateNode` inherits `ModelStateEntry` which has a non-null complex field of type `ModelErrorCollection`. This field is non-null as it's initialized on the constructor of `ModelStateEntry`, which is unnecessary.\r\n\r\nWe should lazily initialize the field with a ModelErrorCollection only when required."}}