-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new method to manage resource in engine #194
Conversation
c4675c4
to
fcac7fd
Compare
64e4e5f
to
67a2e71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LHT129 please add an example of this change, and also need create an issue about this feature
include/vsag/engine.h
Outdated
explicit Engine(Resource* resource = nullptr); | ||
|
||
void | ||
Stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shutdown ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -68,6 +69,8 @@ class SafeAllocator : public Allocator { | |||
private: | |||
Allocator* const raw_allocator_ = nullptr; | |||
std::shared_ptr<Allocator> owned_allocator_ = nullptr; | |||
|
|||
bool owner_{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need deallocator to manage raw_allocator ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
issue is necessary, but I will introduce several pull requests for this feature, this one is the first, the following is the example, test and remove the origin factory method |
9057005
to
4c33d66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
issue: #203