intel / node-realsense

MIT License
24 stars 21 forks source link

[librealsense]Extend the lifecycle of rs::context #222

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.