「view this page in B3 βῆτα server」

Revisions №60614

branch: master 「№60614」
Commited by: Vikram K. Mulligan
GitHub commit link: 「ae40b61100c506a2」 「№3793」
Difference from previous tested commit:  code diff
Commit date: 2019-02-06 18:40:45

Merge pull request #3793 from RosettaCommons/vmullig/enforce_generating_function_privacy Trying to prevent some initialization functions for static const global data from being called from outside the intended context. Currently, a developer could call these functions from anywhere. This causes two problems. First, it duplicates data that have already been generated and are available globally. Second, it creates possible memory leaks, since the data are allocated on the heap by raw pointer, and a developer will probably not think to call `delete[]` on them after finishing with his or her local copy. By making the initialization functions into ordinary functions with no prototype outside of the context in which they are used, these functions can't be used for anything but initializing the static const data that they're supposed to initialize. <b>Edit:</b> This pull request also fixes a memory leak in the ResidueCountFilter, caused by improperly calling one of the initialization functions. Before merging, I need to do the following: - [x] Check that the functions to get properties from strings and strings from properties are unit-tested. - [x] Add some comments to those functions explaining how to use them.

...