Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)

* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
This commit is contained in:
Greg Landrum
2018-01-07 20:19:47 +01:00
committed by Brian Kelley
parent 0a871bd72e
commit ba12d98ad0
71 changed files with 414 additions and 500 deletions

View File

@@ -1,21 +1,21 @@
/*
/*
* $Id: Atom.i 2519 2013-05-17 03:01:18Z glandrum $
*
* Copyright (c) 2010, Novartis Institutes for BioMedical Research Inc.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* met:
*
* * Redistributions of source code must retain the above copyright
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
* nor the names of its contributors may be used to endorse or promote
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
* nor the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -100,11 +100,11 @@
std::vector<RDKit::Bond*> *getBonds() {
std::vector<RDKit::Bond*> *bonds = new std::vector<RDKit::Bond*>;
const RDKit::ROMol *parent = &($self)->getOwningMol();
RDKit::ROMol *parent = &($self)->getOwningMol();
RDKit::ROMol::OEDGE_ITER begin,end;
boost::tie(begin,end) = parent->getAtomBonds(($self));
while(begin!=end){
RDKit::Bond *tmpB = (*parent)[*begin].get();
RDKit::Bond *tmpB = (*parent)[*begin];
bonds->push_back(tmpB);
begin++;
}
@@ -112,4 +112,3 @@
}
}