Beckhoff / ADS

Beckhoff protocol to communicate with TwinCAT devices.
MIT License
513 stars 194 forks source link

dev-ooi: Handles currently can "outlive" the global AmsRouter object #41

Closed mwiarda closed 7 years ago

mwiarda commented 7 years ago

Hi,

I'm currently working on the ooi branch and its looking good so far. However, there is a problem with the HandleGuard and the HandleDeleter functor. HandleDeleter::() uses the global AmsRouter object to delete the handle. However, in the "relatively special" case that an AdsVariable object is global and outlives the router we currently run into an exception.

The Construct On First Use Idiom would probably solve this.

Regards Michael

pbruenn commented 7 years ago

Hi Michael, thank's for testing, I try to look into this until end of this week. Regards, Patrick

pbruenn commented 7 years ago

Okay I meant end of this week ;-).