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.
Fork of nRF51822 by
Diff: source/nRF5xSecurityManager.cpp
- Revision:
- 457:da0323feba9b
- Parent:
- 389:db85a09c27ef
- Child:
- 562:613dbbdeed27
diff -r e33de7c4574c -r da0323feba9b source/nRF5xSecurityManager.cpp
--- 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
