MANAGING OBJECT LIFETIME FOR NATIVE/MANAGED PEERS
    21.
    发明申请
    MANAGING OBJECT LIFETIME FOR NATIVE/MANAGED PEERS 有权
    管理对象/管理对象的对象生命周期管理

    公开(公告)号:US20080270482A1

    公开(公告)日:2008-10-30

    申请号:US11741549

    申请日:2007-04-27

    IPC分类号: G06F17/00 G06F17/30

    摘要: A system that manages lifetime of an object is provided. The system analyzes references on multiple objects to determine reachability of a native peer and dynamically transitions between native and managed object lifetime management systems based on the analysis. When a native peer is not reachable by a native application reference, the system weakens references to a managed peer avoiding memory leaks and clones the native references to the managed side to avoid premature collection. The system performs an optimized cleanup during object system shutdown wherein the references between managed and native peers are released and SafeHandles are suppressed from finalization. The system employs a pending remove list that stores a reference to a weak reference of a managed peer to eliminate race conditions that occur during finalization.

    摘要翻译: 提供一种管理对象生命周期的系统。 系统分析多个对象的引用,以确定本地对等体的可达性,并基于分析在本机管理对象生命周期管理系统之间进行动态转换。 当原生对等体不能被本地应用程序引用访问时,系统会削弱对被管理对等体的引用,避免内存泄漏,并克隆对被管理方的本机引用,以避免过早收集。 系统在对象系统关闭期间执行优化的清理,其中管理和本机对等体之间的引用被释放,并且SafeHandles被禁止完成。 该系统采用一个挂起的删除列表,该列表存储对受管对等体的弱引用的引用,以消除在最终确定期间发生的竞争条件。