I encountered some when repeatedly executing a spice code for transient analysis.
I saw it in two situation:
1. when using ngspice as shared library (here from rlab), repeated execution of the same circuit through
ret = ((int * (*)(char**)) ngSpice_Circ_handle)(circarray);
ret = ((int * (*)(char*)) ngSpice_Command_handle)("bg_run");
increases memory footprint of rlab, and increases in execution time (in my case for the file "r1.ckt" below, by 0.4 second for each call)
2. increase in memory footprint comes from ngspice, and I verified it by running ngspice from command line, looking at the output of the "top" command, and then repeatedly typing the same file name, here "r1.ckt".
Am I doing something wrong?