Skip to content

[C++ API] Objects leaking in the C++ language Support. #12041

@AmeerHajAli

Description

@AmeerHajAli

The c++ API is leaking objects. We suspect this is due to reference counting. We might need to add a class like this in the C++ API https://github.com/ray-project/ray/blob/master/python/ray/includes/object_ref.pxi.

example:

auto r1 = actor5.Task(&Counter::Add, r0).Remote();
auto r2 = actor5.Task(&Counter::Add, r1).Remote();
auto r3 = actor5.Task(&Counter::Add, r2).Remote();
int result3 = *(Ray::Get(r3)); // this will remove r0, r1, r2, r3, which is pretty scary.
// int result2 = *(Ray::Get(r2)); // will not work
// int result2 = *(Ray::Get(r1)); // will not work
// int result2 = *(Ray::Get(r0)); // will not work
  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Metadata

Metadata

Labels

bugSomething that is supposed to be working; but isn'tgood-first-issueGreat starter issue for someone just starting to contribute to Ray

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions