nRFGattClient: move the allocation of the singleton to within the getInstance() method.

This saves memory when getInstance() isn't used.
This commit is contained in:
Rohit Grover 2015-08-11 10:32:33 +01:00
parent ab1f76572e
commit e699db6a54

View file

@ -16,10 +16,9 @@
#include "nRF5xGattClient.h"
nRF5xGattClient nRFGattClientSingleton;
nRF5xGattClient &
nRF5xGattClient::getInstance(void) {
static nRF5xGattClient nRFGattClientSingleton;
return nRFGattClientSingleton;
}