Skip to content

How to track life cycle of Arc<Database> #15

Open
@katyo

Description

@katyo

I need to track final dropping of Database object in Arc. In particular I need delete databases (i.e. by calling Database::delete()) which was removed by the application when all references to it is dead.

My idea is a newtype wrapper for Database. I created the struct WrappedDatabase and implemented Deref trait for this newtype, but it still doesn't allows me to create cursors using Arc<WrappedDatabase> because it requires something which implements Into<Supercow<'a, Database>>.

Are anybody known a right solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions