Hello
I was looking at the documentation about fetching a Navigation Property asyncronyously. Below is an example of a code snippet to fetch a nav property:
RelatedEntityList<AnalysisDefinitionMethod> availableMethods = aResult.AnalysisDefinitionMethods;
availableMethods.PendingEntityListResolved += (sender, args) => args.ResolvedEntities.ForEach(e => code to load the results);
My concern here is that creating an anonymous event handler of PendingEntityListResolved will cause a memory leak because the variable availableMethods will never get garbage collected. Is this true or will the event handler be released properly when availableMethods goes out of scope?
Thanks!