Убрал утечку памяти
This commit is contained in:
parent
5a6972e698
commit
7e7ec0e12c
3 changed files with 13 additions and 22 deletions
|
@ -64,6 +64,8 @@ void repairPolygon(polygon * plgn) {
|
|||
delLine(&lns, i--);
|
||||
}
|
||||
}
|
||||
|
||||
free(lns.arr);
|
||||
}
|
||||
|
||||
bool isNull(point vector) {
|
||||
|
@ -82,19 +84,6 @@ DELFUNC(Vector, points)
|
|||
|
||||
DELFUNC(Line, lines)
|
||||
|
||||
//void delVector(points * vectors, int index) {
|
||||
// DEL(vectors -> arr, index, vectors -> len)
|
||||
// vectors -> len--;
|
||||
//}
|
||||
//
|
||||
//void delLine(lines * lns, int index) {
|
||||
// for (int i = index + 1; i < lns -> len; ++i) {
|
||||
// lns -> arr[i] = lns -> arr[i - 1];
|
||||
// }
|
||||
//
|
||||
// lns -> len--;
|
||||
//}
|
||||
|
||||
polygon getPolygon(polygon * plgn, double shift) {
|
||||
points vectors = getVectors(plgn -> pts);
|
||||
int secind, len = plgn -> pts.len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue