Plug a memory leak
Add function HICUMdelete() to remove model->HICUMversion
This commit is contained in:
parent
7dd96c241c
commit
b5054cc9f1
|
|
@ -10,7 +10,7 @@ Model Author : 1990 Michael Schröter TU Dresden
|
|||
extern int HICUMacLoad(GENmodel *,CKTcircuit*);
|
||||
extern int HICUMask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
extern int HICUMconvTest(GENmodel*,CKTcircuit*);
|
||||
extern int HICUMdelete(GENinstance*);
|
||||
extern int HICUMmDelete(GENmodel*);
|
||||
extern int HICUMgetic(GENmodel*,CKTcircuit*);
|
||||
//extern int HICUMload(GENmodel*,CKTcircuit*);//moved to hicumL2.hpp
|
||||
extern int HICUMmAsk(CKTcircuit*,GENmodel*,int,IFvalue*);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ SPICEdev HICUMinfo = {
|
|||
.DEVacLoad = HICUMacLoad,
|
||||
.DEVaccept = NULL,
|
||||
.DEVdestroy = NULL,
|
||||
.DEVmodDelete = NULL,
|
||||
.DEVmodDelete = HICUMmDelete,
|
||||
.DEVdelete = NULL,
|
||||
.DEVsetic = HICUMgetic,
|
||||
.DEVask = HICUMask,
|
||||
|
|
|
|||
|
|
@ -861,3 +861,13 @@ HICUMunsetup(
|
|||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
int
|
||||
HICUMmDelete(GENmodel* gen_model)
|
||||
{
|
||||
HICUMmodel* model = (HICUMmodel*)gen_model;
|
||||
|
||||
FREE(model->HICUMversion);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue