Merge pull request #458 from antmicro/kr/memory_slice

systemverilog-plugin: convert memory when accessing slice
diff --git a/systemverilog-plugin/UhdmAst.cc b/systemverilog-plugin/UhdmAst.cc
index 425c8dc..0525f35 100644
--- a/systemverilog-plugin/UhdmAst.cc
+++ b/systemverilog-plugin/UhdmAst.cc
@@ -311,7 +311,6 @@
     // return range from *current* selected range
     // in the end, it results in whole selected range
     id->basic_prep = true;
-    result->dumpAst(NULL, "> ");
     return result;
 }
 
@@ -3854,6 +3853,7 @@
     // calls another function that is not imported in the calling scope.
     if (vpiHandle function_h = vpi_handle(vpiFunction, obj_h)) {
         current_node->str = get_name(function_h, true);
+        vpi_release_handle(function_h);
     }
 }