Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/19 14:36:48 (5 years ago)
Author:
ddorfmei
Message:

#2931:

  • Added StorableType attribute to interfaces and classes where it was missing
  • Moved code from HeuristicLabOrToolsPlugin.OnUnload() to finalizer because native DLL was unloaded to early
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.ExtLibs/HeuristicLab.OrTools/7.0.0/HeuristicLab.OrTools-7.0.0/Plugin.cs.frame

    r16910 r16940  
    3838  public class HeuristicLabOrToolsPlugin : PluginBase {
    3939
    40     public override void OnUnload() {
    41       // HACK: free handle to native DLL used temporarily by the Hive Slave
    42       // should be solved for all native DLLs used by the Hive Slave
     40    ~HeuristicLabOrToolsPlugin() {
     41      // HACK: Free handle to native DLL used temporarily by the Hive Slave.
     42      // Finalizer must be used because generated finalizers used in
     43      // HeuristicLab.ExactOptimization that call destructors in native DLL
     44      // are called after HeuristicLabOrToolsPlugin.OnUnload().
     45      // This should be solved for all native DLLs used by the Hive Slave.
    4346      var dllDir = new FileInfo(GetType().Assembly.Location).Directory;
    4447      if (dllDir == null || !dllDir.FullName.Contains(Path.DirectorySeparatorChar + "PluginTemp" + Path.DirectorySeparatorChar))
Note: See TracChangeset for help on using the changeset viewer.