Ejemplo n.º 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
Ejemplo n.º 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]
Ejemplo n.º 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]