Commit 98426435 authored by camp's avatar camp

Fixed memory leaks and warnings.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12533 18c085ea-50e0-402c-830e-de6fd14e8384
parent 81899b9c
......@@ -83,8 +83,10 @@ avtFileDescriptorManager::avtFileDescriptorManager()
avtFileDescriptorManager::~avtFileDescriptorManager()
{
// Can't really think of a good reason to make all of the files be closed.
// This should never be called anyway.
closeFileCallbacks.clear();
closeFileArgs.clear();
fileIsOpen.clear();
fileTimestamp.clear();
}
......
......@@ -182,6 +182,11 @@ avtExternallyRenderedImagesActor::~avtExternallyRenderedImagesActor()
visualQueueMapper->Delete();
visualQueueMapper = NULL;
}
if (visualQueueActor != NULL)
{
visualQueueActor->Delete();
visualQueueActor = NULL;
}
if (visualQueueProps != NULL)
{
visualQueueProps->Delete();
......
......@@ -427,6 +427,16 @@ VisWindow::~VisWindow()
delete axes3D;
axes3D = NULL;
}
if (axesArray != NULL)
{
delete axesArray;
axesArray = NULL;
}
if (axesParallel != NULL)
{
delete axesParallel;
axesParallel = NULL;
}
if (tools != NULL)
{
delete tools;
......
/* $Id: signals.c,v 1.5 2005/09/14 02:30:56 rcook Exp $ */
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
# include <winsock2.h>
#else
......
......@@ -393,6 +393,9 @@ Engine::~Engine()
delete cloneNetworkRPC;
delete procInfoRPC;
delete simulationCommandRPC;
delete exportDatabaseRPC;
delete constructDataBinningRPC;
delete namedSelectionRPC;
delete setEFileOpenOptionsRPC;
delete viewer;
......@@ -400,6 +403,10 @@ Engine::~Engine()
delete renderingDisplay;
#ifdef DEBUG_MEMORY_LEAKS
delete parsingExprList;
#endif
// Delete the network manager last since it deletes plugin managers
// and our RPC's may need to call plugin AttributeSubject destructors.
// We can't seem to do that reliably on Linux once plugins have been
......@@ -978,6 +985,9 @@ Engine::SetUpViewerInterface(int *argc, char **argv[])
Parser *p = new ExprParser(new avtExprNodeFactory());
ParsingExprList *l = new ParsingExprList(p);
xfer->Add(l->GetList());
#ifdef DEBUG_MEMORY_LEAKS
parsingExprList = l;
#endif
// Hook up metadata and SIL to be send back to the viewer.
// This is intended to only be used for simulations.
......
......@@ -368,6 +368,10 @@ class ENGINE_MAIN_API Engine
NamedSelectionRPC *namedSelectionRPC;
SetEFileOpenOptionsRPC *setEFileOpenOptionsRPC;
#ifdef DEBUG_MEMORY_LEAKS
ParsingExprList *parsingExprList;
#endif
// The metadata, filename, format, control data for a simulation
std::string filename;
std::string format;
......
......@@ -61,7 +61,7 @@ void motion_estimation _ANSI_ARGS_((unsigned char *oldorg, unsigned char *neworg
struct mbinfo *mbi, int secondfield, int ipflag));
/* mpeg2enc.c */
void error _ANSI_ARGS_((char *text));
void error _ANSI_ARGS_((const char *text));
/* predict.c */
void predict _ANSI_ARGS_((unsigned char *reff[], unsigned char *refb[],
......
......@@ -148,9 +148,9 @@ static void init()
}
void error(text)
char *text;
const char *text;
{
fprintf(stderr,text);
fputs(text,stderr);
putc('\n',stderr);
exit(1);
}
......
......@@ -597,7 +597,7 @@ vtkVisItClipper::Execute()
}
if (!canClip)
{
if (numIcantClip == NULL)
if (numIcantClip == 0)
stuff_I_cant_clip->GetCellData()->
CopyAllocate(ds->GetCellData(), nCells);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment