This patch adds some of the groundwork required for tracking the lifetime of scripts and allocations and collecting data associated with them during execution.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
A few suggestions to move things over into RenderScriptRuntime.cpp and to possibly use std::unique_ptr, but they are just suggestions.
source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | ||
---|---|---|
258–259 | Are you actually handing out shared pointers to anyone? If you are just using std::shared_ptr so you can put things into the vector, you can probably just use std::unique_ptr. | |
298 | If you only need memory management you could say that "m_scripts" owns the objects (if they start using std::unique_ptr) and hand out a raw pointer here. Not sure on your memory management needs though. | |
304 | Ditto above comment. | |
307–417 | Does anyone really need to see these objects outside of RenderScriptRuntime.cpp? If not, move these into RenderScriptRuntime.cpp. |
Are you actually handing out shared pointers to anyone? If you are just using std::shared_ptr so you can put things into the vector, you can probably just use std::unique_ptr.