mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Clean up vals_words when a dynamic array is accessed using the vpi
This commit is contained in:
+2
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2014 Stephen Williams ([email protected])
|
||||
* Copyright (c) 2012-2015 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -344,6 +344,7 @@ vpiHandle vpip_make_queue_var(const char*name, vvp_net_t*net)
|
||||
void darray_delete(vpiHandle item)
|
||||
{
|
||||
class __vpiDarrayVar*obj = dynamic_cast<__vpiDarrayVar*>(item);
|
||||
if (obj->vals_words) delete [] (obj->vals_words-1);
|
||||
delete obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user