casbin / casbin-cpp

An authorization library that supports access control models like ACL, RBAC, ABAC in C/C++
https://casbin.org
Apache License 2.0
223 stars 61 forks source link

perf: Remove shared_ptr in defaultRoleManager #206

Closed sheny1xuan closed 2 years ago

sheny1xuan commented 2 years ago
* Share_ptr will cause performance loss.
* Share_ptr may cause circular reference of Roles, which will cause memeory leak.
* RoleManager take ownership of the resource, responsible for the application and release of Role*, Role only use this pointer.

Signed-off-by: Stonexx 1479765922@qq.com

Fixes #

Description

Screenshots/Testimonials

casbin-bot commented 2 years ago

@EmperorYP7 @divy9881 @noob20000405 please review

hsluoyz commented 2 years ago

@EmperorYP7

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.50.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: