if (gControls->cfg) {  if (gControls->cfg->targetSubfolder) DisposePtr((Ptr) gControls->cfg->targetSubfolder); if (gControls->cfg->globalURL) DisposePtr((Ptr) gControls->cfg->globalURL);   if (gControls->cfg->licFileName) DisposePtr((Ptr) gControls->cfg->licFileName);   for (i = 0; i < kNumWelcMsgs; i++) { if (gControls->cfg->welcMsg[i]) DisposePtr((Ptr) gControls->cfg->welcMsg[i]); } if (gControls->cfg->readmeFile) DisposePtr((Ptr) gControls->cfg->readmeFile); if (gControls->cfg->readmeApp) DisposePtr((Ptr) gControls->cfg->readmeApp);   if (gControls->cfg->selCompMsg) DisposePtr((Ptr) gControls->cfg->selCompMsg); if (gControls->cfg->selAddMsg) DisposePtr((Ptr) gControls->cfg->selAddMsg);   if (gControls->cfg->startMsg) DisposePtr((Ptr) gControls->cfg->startMsg); if (gControls->cfg->saveBitsMsg) DisposePtr((Ptr) gControls->cfg->saveBitsMsg);   if (gControls->cfg->coreFile) DisposePtr((Ptr) gControls->cfg->coreFile); if (gControls->cfg->coreDir) DisposePtr((Ptr) gControls->cfg->coreDir); if (gControls->cfg->noAds) DisposePtr((Ptr) gControls->cfg->noAds); if (gControls->cfg->silent) DisposePtr((Ptr) gControls->cfg->silent); if (gControls->cfg->execution) DisposePtr((Ptr) gControls->cfg->execution); if (gControls->cfg->confirmInstall) DisposePtr((Ptr) gControls->cfg->confirmInstall);  DisposePtr((Ptr)gControls->cfg); }
void Shutdown(void){	WindowPtr	frontWin;	long 		MIWMagic = 0;#if (SDINST_IS_DLL == 1) && (MOZILLA == 0)	UnloadSDLib(&gConnID);#endif	NavUnload();	/* deallocate config object */	// TO DO		/* deallocate options object */	if (gControls->opt && gControls->opt->folder)	{		DisposePtr((Ptr) gControls->opt->folder);		DisposePtr((Ptr) gControls->opt);	}		/* deallocate all controls */	#if 0/* XXX gets disposed by DisposeWindow() ? */	if (gControls->nextB)		DisposeControl(gControls->nextB);  	if (gControls->backB)		DisposeControl(gControls->backB);#endif		if (gControls->lw)		DisposePtr( (char*) gControls->lw);	if (gControls->ww)		DisposePtr( (char*) gControls->ww);	if (gControls->stw)		DisposePtr( (char*) gControls->stw);	if (gControls->cw)		DisposePtr( (char*) gControls->cw);	if (gControls->tw)		DisposePtr( (char*) gControls->tw);		if (gControls)		DisposePtr( (char*) gControls);				frontWin = FrontWindow();	MIWMagic = GetWRefCon(frontWin);	if (MIWMagic != kMIWMagic)		if (gWPtr)			BringToFront(gWPtr);	if (gWPtr)	{		HideWindow(gWPtr);		DisposeWindow(gWPtr);	}}