<commit_before>// @(#)root/pyroot:$Id$
// Author: <NAME>, Jan 2005

// Bindings
#include "PyROOT.h"
#include "PyStrings.h"
#include "ObjectProxy.h"
#include "Utility.h"

// ROOT
#include "TObject.h"
#include "TBufferFile.h"      // for pickling

// CLING WORKAROUND -- #ROOT-6124
#include "TInterpreter.h"
// -- CLING WORKAROUND

// Standard
#include <algorithm>


//- data _______________________________________________________________________
namespace PyROOT {
   R__EXTERN PyObject* gRootModule;
}

//____________________________________________________________________________
void PyROOT::op_dealloc_nofree( ObjectProxy* pyobj ) {
// Destroy the held C++ object, if owned; does not deallocate the proxy.
   if ( pyobj->fObject && ( pyobj->fFlags & ObjectProxy::kIsOwner ) ) {
      if ( ! (pyobj->fFlags & ObjectProxy::kIsValue) )
      // ORIGINAL CODE
      // pyobj->ObjectIsA()->Destructor( pyobj->fObject );
      // CLING WORKAROUND -- #ROOT-6124
      {
         gInterpreter->ClassInfo_Delete( pyobj->ObjectIsA()->GetClassInfo(), pyobj->fObject );
      }
      // -- CLING WORKAROUND
      else
         delete (TInterpreterValue*)pyobj->fObject;
   } else if ( pyobj->fFlags & ObjectProxy::kIsValue )
      delete (TInterpreterValue*)pyobj->fObject;
   pyobj->fObject = NULL;<commit_msg>remove workaround for ROOT-6124, as this is now fixed<commit_after>// @(#)root/pyroot:$Id$
// Author: <NAME>, Jan 2005

// Bindings
#include "PyROOT.h"
#include "PyStrings.h"
#include "ObjectProxy.h"
#include "Utility.h"

// ROOT
#include "TObject.h"
#include "TBufferFile.h"      // for pickling

// Standard
#include <algorithm>


//- data _______________________________________________________________________
namespace PyROOT {
   R__EXTERN PyObject* gRootModule;
}

//____________________________________________________________________________
void PyROOT::op_dealloc_nofree( ObjectProxy* pyobj ) {
// Destroy the held C++ object, if owned; does not deallocate the proxy.
   if ( pyobj->fObject && ( pyobj->fFlags & ObjectProxy::kIsOwner ) ) {
      if ( ! (pyobj->fFlags & ObjectProxy::kIsValue) )
         pyobj->ObjectIsA()->Destructor( pyobj->fObject );
      else
         delete (TInterpreterValue*)pyobj->fObject;
   } else if ( pyobj->fFlags & ObjectProxy::kIsValue )
      delete (TInterpreterValue*)pyobj->fObject;
   pyobj->fObject = NULL;
{'fraction_non_alphanumeric': 0.13468869123252858, 'fraction_numerical': 0.00847098686997035, 'mean_word_length': 3.8401639344262297, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1539396', 'n_tokens_mistral': 754, 'n_tokens_neox': 730, 'n_words': 158}