Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nrf51-sdk
Dependents: microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more
Diff: source/nRF5xSecurityManager.cpp
- Revision:
- 456:da0323feba9b
- Parent:
- 388:db85a09c27ef
- Child:
- 561:613dbbdeed27
--- a/source/nRF5xSecurityManager.cpp Mon Nov 02 09:05:10 2015 +0000 +++ b/source/nRF5xSecurityManager.cpp Mon Nov 02 09:05:10 2015 +0000 @@ -17,6 +17,9 @@ #include "nRF5xSecurityManager.h" nRF5xSecurityManager &nRF5xSecurityManager::getInstance(void) { - static nRF5xSecurityManager m_instance; - return m_instance; + static nRF5xSecurityManager* m_instance = NULL; + if (m_instance == NULL) { + m_instance = new nRF5xSecurityManager(); + } + return *m_instance; } \ No newline at end of file