Updates from BitShares FC #22

Closed
nathanielhourt wants to merge 693 commits from dapp-support into latest-fc
4 changed files with 10 additions and 3 deletions
Showing only changes of commit 869ad45242 - Show all commits

View file

@ -46,7 +46,7 @@ namespace fc {
shared_ptr( shared_ptr&& p )
:_ptr(p._ptr){ p._ptr = nullptr; }
~shared_ptr() { if( nullptr != _ptr ) { _ptr->release(); } }
~shared_ptr() { if( nullptr != _ptr ) { _ptr->release(); _ptr = nullptr; } }
shared_ptr& reset( T* v = nullptr, bool inc = false ) {
if( v == _ptr ) return *this;

View file

@ -39,7 +39,10 @@ namespace fc
~openssl_scope()
{
FIPS_mode_set(0);
CONF_modules_unload(1);
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
}
};

View file

@ -77,6 +77,7 @@ namespace fc {
try {
set_thread_name(name.c_str()); // set thread's name for the debugger to display
this->my = new thread_d( *this, notifier );
cleanup();
current_thread() = this;
p->set_value();
exec();
@ -126,9 +127,11 @@ namespace fc {
}
void thread::cleanup() {
if ( current_thread() ) {
delete current_thread();
current_thread() = nullptr;
}
}
const string& thread::name()const
{

View file

@ -52,6 +52,7 @@ namespace fc {
~thread_d()
{
delete current;
current = nullptr;
fc::context* temp;
for (fc::context* ready_context : ready_heap)
delete ready_context;