Index: trunk/src/plugins/sim_ngspice/sim_ngspice.c =================================================================== --- trunk/src/plugins/sim_ngspice/sim_ngspice.c (revision 10284) +++ trunk/src/plugins/sim_ngspice/sim_ngspice.c (revision 10285) @@ -595,12 +595,19 @@ return 0; } +static int on_unload(fgw_obj_t *obj) +{ + target_spice->unload(obj); + return 0; +} + + static const fgw_eng_t fgw_sim_ngspice_eng = { "target_sim_ngspice", csch_c_call_script, NULL, on_load, - NULL /* unload */ + on_unload }; int pplg_check_ver_sim_ngspice(int ver_needed) { return 0; }