Constructing a class from JS should return a shared_ptr not a raw pointer
Bug #1503730 reported by
Marcus Tomlinson
on 2015-10-07
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| V8-cpp |
Undecided
|
Marcus Tomlinson |
Bug Description
At the moment if you "new" a bound class from within JS it returns a raw pointer to the allocated memory. This makes things really complicated when trying to then pass those objects into a methods that take shared_ptr arguments. We should be creating a shared_ptr upon construction and passing that back to JS. This will naturally gives us better lifecycle control of these objects between JS and C++ as well.
Marcus Tomlinson (marcustomlinson)
on 2015-10-07
summary: |
- "new"ing a class from JS creates a raw pointer + constructing a class from JS returns a raw pointer |
summary: |
- constructing a class from JS returns a raw pointer + Constructing a class from JS returns a raw pointer |
summary: |
- Constructing a class from JS returns a raw pointer + Constructing a class from JS should return a shared_ptr not a raw + pointer |
description: | updated |
Changed in v8-cpp: | |
assignee: | nobody → Marcus Tomlinson (marcustomlinson) |
status: | New → Fix Committed |
To post a comment you must log in.