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

This saves memory when getInstance() isn't used.
master
Rohit Grover 2015-08-11 10:32:33 +01:00
parent ab1f76572e
commit e699db6a54
1 changed files with 1 additions and 2 deletions

View File

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