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:
- 563:9c4b96f7be8d
- Parent:
- 561:613dbbdeed27
--- a/source/nRF5xSecurityManager.cpp Mon Jan 11 10:19:15 2016 +0000
+++ b/source/nRF5xSecurityManager.cpp Mon Jan 11 10:19:16 2016 +0000
@@ -17,8 +17,9 @@
#include "nRF5xSecurityManager.h"
nRF5xSecurityManager &nRF5xSecurityManager::getInstance(void) {
- if (securityManagerInstance == NULL) {
- securityManagerInstance = new nRF5xSecurityManager();
+ static nRF5xSecurityManager* m_instance = NULL;
+ if (m_instance == NULL) {
+ m_instance = new nRF5xSecurityManager();
}
- return (nRF5xSecurityManager &) *securityManagerInstance;
+ return *m_instance;
}
\ No newline at end of file