OPL_LoginDialog::~OPL_LoginDialog() { RemoveControlProperty(dsnView, kPropertyCreator, kPropertyTag); RemoveControlProperty(fdsnView, kPropertyCreator, kPropertyTag); RemoveWindowProperty(getWindow(), kPropertyCreator, kPropertyTag); if (dsnlist) delete dsnlist; if (fdsnlist) delete fdsnlist; }
OSStatus TextViewDelete( WindowRef window, OSType key ) { OSStatus status = eventNotHandledErr; MyMLTEData *pMyMLTEData = NULL; // recover our data from the window status = GetWindowProperty( window, kMyPropertyCreator, key, sizeof(Ptr), NULL, &pMyMLTEData ); require_action( status == noErr, CantGetObj, status = eventNotHandledErr ); // clean up allocated memory TXNDeleteObject( pMyMLTEData->fTXNObj ); DisposePtr( (char*)pMyMLTEData ); status = RemoveWindowProperty( window, kMyPropertyCreator, key ); CantGetObj: return status; }