Rework BpfProgram.h, pass BpfObject as shared_ptr to BpfPrograms

This commit is contained in:
Pragyansh Chaturvedi
2025-10-18 12:36:15 +05:30
parent 763c188fa9
commit 2b99f01b02
3 changed files with 13 additions and 14 deletions

View File

@ -19,7 +19,7 @@ class BpfMap;
* This is the main entry point for loading BPF programs.
* Owns the bpf_object* and manages all programs and maps within it.
*/
class BpfObject {
class BpfObject : public std::enable_shared_from_this<BpfObject> {
private:
struct bpf_object *obj_;
std::string object_path_;