2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00

GC bug fix

This commit is contained in:
2019-11-20 13:19:31 +03:00
parent 76bcd821b5
commit 7de6354857
22 changed files with 442 additions and 236 deletions

View File

@ -84,7 +84,7 @@ namespace Esiur.Resource
/// </summary>
/// <param name="id">Instance Id</param>
/// <returns></returns>
public static AsyncReply<IResource> Get(uint id)
public static AsyncReply<IResource> GetById(uint id)
{
if (resources.ContainsKey(id))
{
@ -317,9 +317,6 @@ namespace Esiur.Resource
/// <returns>Resource instance.</returns>
public static AsyncReply<IResource> Get(string path, object attributes = null, IResource parent = null, IPermissionsManager manager = null)
{
var rt = new AsyncReply<IResource>();
// Should we create a new store ?
@ -528,7 +525,7 @@ namespace Esiur.Resource
var toBeRemoved = resources.Values.Where(x => {
IResource r;
return x.TryGetTarget(out r) && r.Instance.Store == resource;
});
}).ToArray();
foreach (var o in toBeRemoved)
{