Exemple #1
0
def release_ownership(old):
    logger.debug('Release %s', old)
    addr = getPointer(old)
    name = getName(old)
    if _addr2dtor.get((name, addr)) is None:
        clsname = getClassName(old)
        if not _pyclasses[clsname]._has_dtor():
            return
            # Guard duplicated release
        raise Exception("Already released")
    _addr2dtor[(name, addr)] = None
Exemple #2
0
def release_ownership(old):
    logger.debug('Release %s', old)
    addr = getPointer(old)
    name = getName(old)
    key = name, addr
    if key not in _addr2dtor:
        clsname = getClassName(old)
        if not _pyclasses[clsname]._has_dtor():
            return
        # Guard duplicated release
        raise Exception("Already released")
    del _addr2dtor[key]
Exemple #3
0
def release_ownership(old):
    logger.debug('Release %s', old)
    addr = getPointer(old)
    name = getName(old)
    key = name, addr
    if key not in _addr2dtor:
        clsname = getClassName(old)
        if not _pyclasses[clsname]._has_dtor():
            return
        # Guard duplicated release
        raise Exception("Already released")
    del _addr2dtor[key]