* This routine deallocates the memory consumed by the specified * prototype and modifies the corresponding cluster so that it * is no longer marked as a prototype. The cluster is NOT * deallocated by this routine. * @param arg prototype data structure to be deallocated * @return None * @note Exceptions: None * @note History: 5/30/89, DSJ, Created. */
| 586 | * @note History: 5/30/89, DSJ, Created. |
| 587 | */ |
| 588 | void FreePrototype(void *arg) { //PROTOTYPE *Prototype) |
| 589 | PROTOTYPE *Prototype = (PROTOTYPE *) arg; |
| 590 | |
| 591 | // unmark the corresponding cluster (if there is one |
| 592 | if (Prototype->Cluster != NULL) |
| 593 | Prototype->Cluster->Prototype = FALSE; |
| 594 | |
| 595 | // deallocate the prototype statistics and then the prototype itself |
| 596 | if (Prototype->Distrib != NULL) |
| 597 | memfree (Prototype->Distrib); |
| 598 | if (Prototype->Mean != NULL) |
| 599 | memfree (Prototype->Mean); |
| 600 | if (Prototype->Style != spherical) { |
| 601 | if (Prototype->Variance.Elliptical != NULL) |
| 602 | memfree (Prototype->Variance.Elliptical); |
| 603 | if (Prototype->Magnitude.Elliptical != NULL) |
| 604 | memfree (Prototype->Magnitude.Elliptical); |
| 605 | if (Prototype->Weight.Elliptical != NULL) |
| 606 | memfree (Prototype->Weight.Elliptical); |
| 607 | } |
| 608 | memfree(Prototype); |
| 609 | } // FreePrototype |
| 610 | |
| 611 | /** |
| 612 | * This routine is used to find all of the samples which |
no test coverage detected