nRFGattClient: move the allocation of the singleton to within the getInstance() method.
This saves memory when getInstance() isn't used.master
parent
ab1f76572e
commit
e699db6a54
|
@ -16,10 +16,9 @@
|
|||
|
||||
#include "nRF5xGattClient.h"
|
||||
|
||||
nRF5xGattClient nRFGattClientSingleton;
|
||||
|
||||
nRF5xGattClient &
|
||||
nRF5xGattClient::getInstance(void) {
|
||||
static nRF5xGattClient nRFGattClientSingleton;
|
||||
return nRFGattClientSingleton;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue