improves memory usage of library

this fixes publishing actuator values taht failed sometimes.