intel / node-realsense

MIT License
24 stars 21 forks source link

[librealsense]Extend lifecycle of rs::context #223

Closed minggangw closed 7 years ago

minggangw commented 7 years ago

The created Context object will be recycled by the GC if we don't hold a reference, which will lead the rs::context and its related rs::device are going to be de-constructed. So, here we'd better extend the life cycle of rs::context to the whole process by using a static global variable.

Fix #222

minggangw commented 7 years ago

@kenny-y PTAL