• gobuksun

    gobuksun - 2009-04-10

    First, thanks for your great article. you did really good job Arne Steinarson. Wink
    I think this DynObj could be generated with CLI or JNI.
    Do you have any plan to make DynObj for using in C# or JAVA ? I hope so ^^;

    one more.

    I have found memory leak from DoRunTime.cpp (line 219)

    DoRunTimeC &DoRunTimeC::GetInstance( bool do_get ){_CFE_;
    if( do_get ){
    if( !g_pdort && g_dort_ok>=0 &&
    DelaySingleton<DoRunTimeC>::ms_ref_cnt>0 ){
    g_pdort = new DoRunTimeC;
    doSetRunTime( g_pdort );
    int sz_dynobj = GetVTableSizeOf<DynObj,void>();
    else {
    // Request to destroy the one instance
    if( g_pdort ){
    // Dismantle any references to tracked objects, it won't work after
    // setting DORT==NULL.
    doSetRunTime( NULL );
    g_pdort = NULL;

    // I have inserted this code for prevent memory leak !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    if( g_pdort_mut ){
    delete g_pdort_mut;
    g_pdort_mut = NULL;
    return *g_pdort;

    Is correct ? or can make problem ?

    • arst

      arst - 2009-04-25


      Thanks for your input, I've been busy, so catching up now.

      Being able to share dynamic objects across JAVA/.NET boundary would be great, and I think it could be done. ...but, not by me!

      You want to destroy the global mutex. It should be automatically destroyed by DoRunTimeGlobConstr::~DoRunTimeGlobConstr().

      I know that C/C++ runtimes may fail to run global dtors sometimes.

      Or, if you have a mem leak tracker installed, it could run before all global dtors have been run.

      So, not a memory leak.

      // ATS.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks