diff --git a/src/core/chuck_compile.cpp b/src/core/chuck_compile.cpp index ac9565c6c..434406f15 100644 --- a/src/core/chuck_compile.cpp +++ b/src/core/chuck_compile.cpp @@ -1111,12 +1111,10 @@ t_CKBOOL Chuck_Compiler::compile_single( Chuck_CompileTarget * target ) // commit if( ret ) // 1.5.4.3 (ge) update to call commit_namespaces | was: env()->global()->commit(); - { env()->global()->commit(); } - // { env()->commit_namespaces(); } + { env()->commit_namespaces(); } // or rollback else // 1.5.4.3 (ge) update to call commit_namespaces | was: env()->global()->rollback(); - { env()->global()->rollback(); } - // { env()->rollback_namespaces(); } + { env()->rollback_namespaces(); } // unload the context from the type-checker if( !type_engine_unload_context( env() ) ) diff --git a/src/core/chuck_scan.cpp b/src/core/chuck_scan.cpp index 3e19b54a6..6243ae9e5 100644 --- a/src/core/chuck_scan.cpp +++ b/src/core/chuck_scan.cpp @@ -365,7 +365,8 @@ t_CKBOOL type_engine_scan0_class_def( Chuck_Env * env, a_Class_Def class_def ) // allocate value type = env->ckt_class->copy( env, env->context ); - type->actual_type = the_class; + // 1.5.4.3 (ge) add reference count to actual_type | was: type->actual_type = the_class; + CK_SAFE_REF_ASSIGN(type->actual_type, the_class); value = env->context->new_Chuck_Value( type, the_class->base_name ); value->owner = env->curr; CK_SAFE_ADD_REF(value->owner); value->is_const = TRUE; diff --git a/src/core/chuck_type.cpp b/src/core/chuck_type.cpp index 1a6a4f513..fca1b9b3a 100644 --- a/src/core/chuck_type.cpp +++ b/src/core/chuck_type.cpp @@ -904,12 +904,10 @@ t_CKBOOL type_engine_check_prog( Chuck_Env * env, a_Program prog, // commit if( ret ) // 1.5.4.3 (ge) update to env->commit_namespaces() | was: env->global()->commit(); - { env->global()->commit(); } - // { env->commit_namespaces(); } + { env->commit_namespaces(); } // or rollback else // 1.5.4.3 (ge) update to env->commit_namespaces() | was: env->global()->rollback(); - { env->global()->rollback(); } - // { env->rollback_namespaces(); } + { env->rollback_namespaces(); } // unload the context from the type-checker if( !type_engine_unload_context( env ) ) @@ -9936,7 +9934,8 @@ void Chuck_Type::reset() // TODO: verify this is valid for final shutdown sequence, including Chuck_Env::cleanup() CK_SAFE_RELEASE( ugen_info ); // 1.5.4.3 (ge) added #2024-func-call-update CK_SAFE_RELEASE( func_bridge ); // 1.5.4.3 (ge) added #2024-func-call-update - CK_SAFE_RELEASE( array_type ); // 1.5.4.3 (ge) added #2024-func-call-update + // FYI actual_type is UNION with array_type + CK_SAFE_RELEASE( actual_type ); // 1.5.4.3 (ge) added #2024-func-call-update CK_SAFE_RELEASE( parent_type ); // 1.5.4.3 (ge) added #2024-func-call-update } }