added Destructor

This commit is contained in:
Ken Martin 2002-09-17 10:38:34 -04:00
parent 0a2f6c876c
commit 222b04f6d9
2 changed files with 20 additions and 0 deletions

View File

@ -45,6 +45,15 @@ void FinalPass(void *inf, void *mf)
} }
} }
void Destructor(void *inf)
{
cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf;
// get our client data from initial pass
cmVTKWrapTclData *cdata =
(cmVTKWrapTclData *)info->CAPI->GetClientData(info);
free(cdata);
}
CM_PLUGIN_EXPORT const char *cmGetName() CM_PLUGIN_EXPORT const char *cmGetName()
{ {
return "CMAKE_TEST_COMMAND"; return "CMAKE_TEST_COMMAND";
@ -54,6 +63,7 @@ void CM_PLUGIN_EXPORT cmInitializeCommand(cmLoadedCommandInfo *info)
{ {
info->InitialPass = InitialPass; info->InitialPass = InitialPass;
info->FinalPass = FinalPass; info->FinalPass = FinalPass;
info->Destructor = Destructor;
info->m_Inherited = 0; info->m_Inherited = 0;
} }

View File

@ -45,6 +45,15 @@ void FinalPass(void *inf, void *mf)
} }
} }
void Destructor(void *inf)
{
cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf;
// get our client data from initial pass
cmVTKWrapTclData *cdata =
(cmVTKWrapTclData *)info->CAPI->GetClientData(info);
free(cdata);
}
CM_PLUGIN_EXPORT const char *cmGetName() CM_PLUGIN_EXPORT const char *cmGetName()
{ {
return "CMAKE_TEST_COMMAND"; return "CMAKE_TEST_COMMAND";
@ -54,6 +63,7 @@ void CM_PLUGIN_EXPORT cmInitializeCommand(cmLoadedCommandInfo *info)
{ {
info->InitialPass = InitialPass; info->InitialPass = InitialPass;
info->FinalPass = FinalPass; info->FinalPass = FinalPass;
info->Destructor = Destructor;
info->m_Inherited = 0; info->m_Inherited = 0;
} }