You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raw pointers can make many nervous about memory leaks, because these pointers can be lost track of.
For example, with gprtTriangleAccelCreate, we could internally create a std::unique_pointer<TriangleAccel> and then add it to a vector on the context passed into that create call. Then, we'd return a raw pointer pointing to that unique pointer object.
The text was updated successfully, but these errors were encountered:
The main concern we want to keep in mind is that users need to maintain control over when objects are created and destroyed. Any GPU allocations and frees cause large stalls on GPUs, so it's important that the user be aware of when these occur.
We also want to maintain a C API I think, hence the final raw pointer returned to the user.
Raw pointers can make many nervous about memory leaks, because these pointers can be lost track of.
For example, with gprtTriangleAccelCreate, we could internally create a
std::unique_pointer<TriangleAccel>
and then add it to a vector on the context passed into that create call. Then, we'd return a raw pointer pointing to that unique pointer object.The text was updated successfully, but these errors were encountered: