Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

singleton manager #52

Closed
Closed
@mli

Description

a singleton manager to guarantee the destruct order. one reason is that, any class needs to destroy narray should guarantee engine is still alive because narray calls Engine::Get()->PushDelete()

an example solution:

struct Singleton {
    static KVStore store;
   // others 
    static Engine engine;
};
Engine::Get() { return &Singleton::engine; }

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions