summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono/EoWrapper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/eo_mono/EoWrapper.cs')
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 554f4ec9bd..cc57be910c 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -19,6 +19,7 @@ using System.Runtime.CompilerServices;
using System.Threading;
using System.Reflection;
using System.Collections;
+using System.Collections.Concurrent;
namespace Efl
{
@@ -44,6 +45,9 @@ public abstract class EoWrapper : IWrapper, IDisposable
private static Efl.EventCb ownershipUniqueDelegate = new Efl.EventCb(OwnershipUniqueCallback);
private static Efl.EventCb ownershipSharedDelegate = new Efl.EventCb(OwnershipSharedCallback);
+ private ConcurrentDictionary<string, IntPtr> cached_strings = new ConcurrentDictionary<string, IntPtr>();
+ private ConcurrentDictionary<string, IntPtr> cached_stringshares = new ConcurrentDictionary<string, IntPtr>();
+
private Hashtable keyValueHash = null;
/// <summary>Constructor to be used when objects are expected to be constructed from native code.
@@ -195,9 +199,12 @@ public abstract class EoWrapper : IWrapper, IDisposable
{
Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(handle);
}
-
Monitor.Exit(Efl.All.InitLock);
}
+
+ // Are these threadsafe?
+ Efl.Eo.Globals.free_dict_values(cached_strings);
+ Efl.Eo.Globals.free_stringshare_values(cached_stringshares);
}
/// <summary>Turns the native pointer into a string representation.