Closed fishsclue closed 2 months ago
Calling the enforce method in a loop causes the memory usage to go up all the time, how can I fix this?
#include <iostream> #include <casbin/casbin.h> using namespace std; using namespace casbin; int main() { Enforcer enforcer("path/to/model.conf", "path/to/policy.csv"); string sub = "alice"; string obj = "data1"; string act = "read"; for (int i = 0; i < 10000; ++i) { if (enforcer.Enforce(sub, obj, act)) { cout << "allow" << endl; } else { cout << "deny" << endl; } } return 0; }
@EmperorYP7 @sheny1xuan @cs1137195420
Description
Calling the enforce method in a loop causes the memory usage to go up all the time, how can I fix this?
Your System Info
Screenshots/Testimonials