Tcp::~Tcp() { if (_type == SERVER || _type == CLIENT) { if (_conn->proto.tcp) free(_conn->proto.tcp); free(_conn); } unreg(); }
int main(int argc,char *argv[]) { if (argc == 3 && strcmp(argv[1], "-unreg") == 0) { unreg(argv[2]); } else if (argc == 8 && strcmp(argv[1], "-reg") == 0) { reg(argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); } return 0; }
static void UnWTS (void) { if (hwtsapi32 != 0) { typedef BOOL (WINAPI *ursn)(HWND); ursn unreg = (ursn)GetProcAddress (hwtsapi32, "WTSUnRegisterSessionNotification"); if (unreg != 0) { unreg (Window); } FreeLibrary (hwtsapi32); hwtsapi32 = 0; } }
void NativeTextureGLES::release() { if (_id) { NativeTextureGLES::created--; glDeleteTextures(1, (GLuint*)&_id); _id = 0; } if (_fbo) { oxglDeleteFramebuffers(1, (GLuint*)&_fbo); _fbo = 0; } unreg(); CHECKGL(); }
void UberShaderProgramBase::release() { releaseShaders(); unreg(); }
Restorable::~Restorable() { unreg(); }
/* * prodreg_unregister * * This will unregister a component unless (a) the component has * dependencies, in which case the command will fail and an error * will be output UNLESS the 'force' option is set, (b) the * component criteria is ambiguous, in which case the list of * possible matching components is returned. * * pcRoot An alternate root, if non-null. * criteria The component's name, uuid, browse number, etc. * force If this is set, unregister even if the component * has others which depend on it. * recursive Will deregister the component and all children and * nodes which depend upon it. * * Returns: Nothing. * Side effects: Changes the state of the registry, if the user * has permission to do so. */ void prodreg_unregister(const char *pcRoot, Criteria criteria, int force, int recursive) { Wsreg_component **ppws_ambig = NULL; Wsreg_component **ppws_dep = NULL; Wsreg_component *pws = NULL; Wsreg_component **ppws_syspkgs = NULL; int i; int result; if (SPECIALROOT(criteria, ROOT_UUID, ROOT_STR) || SPECIALROOT(criteria, UNCL_UUID, UNCL_STR) || SPECIALROOT(criteria, LOCL_UUID, LOCL_STR) || SPECIALROOT(criteria, ADDL_UUID, ADDL_STR) || SPECIALROOT(criteria, SYSS_UUID, SYSS_STR) || SPECIALROOT(criteria, global_ENTR_UUID, ENTR_STR) || SPECIALROOT(criteria, SYSL_UUID, SYSL_STR)) { fail(PRODREG_UNREGISTER); } if (pcRoot && pcRoot[0] == '\0') pcRoot = NULL; if ((result = wsreg_initialize(WSREG_INIT_NORMAL, pcRoot)) != WSREG_SUCCESS) { debug(DEBUGINFO, "Could not init, reason = %d\n", result); fail(PRODREG_CONVERT_NEEDED_ACCESS); } /* * Check uid is 0, otherwise we may fail later. * This is a work around for the case where sometimes * wsreg_can_access_registry says YES, but the answer is NO. */ if (_private_wsreg_can_access_registry(O_RDWR) == 0) { fail(PRODREG_CANNOT_WRITE); } /* * Handle the simple mnemonic case. */ if (criteria.mask & FIND_UNAME) { unreg(pws, criteria, recursive); return; } pws = prodreg_get_component(pcRoot, criteria, 0, &ppws_ambig, &ppws_syspkgs); if (pws == NULL) fail(PRODREG_NO_SUCH_COMPONENT); db_open(); if (ppws_ambig) { if (force == 0) { (void) printf(PRODREG_AMBIGUOUS_RESULTS); (void) printf("\n"); browse_header(); } for (i = 0; ppws_ambig[i]; i++) { if (force) { unreg(ppws_ambig[i], criteria, 0); } else { Wsreg_component **p = wsreg_get_child_references(ppws_ambig[i]); fill_in_comps(p, ppws_syspkgs); show(NODE, 1, 0, get_bn(ppws_ambig[i]->id), ppws_ambig[i]->id, ppws_ambig[i]->instance, wsreg_get_display_name(ppws_ambig[i], global_lang)); if (p) { wsreg_free_component_array(p); p = NULL; } } } if (ppws_syspkgs) wsreg_free_component_array(ppws_syspkgs); return; } /* This will exit if pws has dependents, unless forced. */ check_dependent(recursive, force, pws, PRODREG_UNREG_WOULD_BREAK); unreg(pws, criteria, recursive); wsreg_free_component(pws); if (ppws_dep) wsreg_free_component_array(ppws_dep); if (ppws_syspkgs) wsreg_free_component_array(ppws_syspkgs); db_close(); }