From e3e0ca8953f7b0306014435c4a23f8a2dc17a82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=81=D1=82=D0=B0=D1=81=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=A0=D1=8B=D0=B1=D0=BA=D0=B8=D0=BD=D0=B0?= Date: Mon, 25 Nov 2024 23:06:52 +0300 Subject: [PATCH] lab4 update --- LibraryCPPTemplate/Tests/graph.cpp | 1 - LibraryCPPTemplate/graph.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/LibraryCPPTemplate/Tests/graph.cpp b/LibraryCPPTemplate/Tests/graph.cpp index 0a05b18b8b..3a2571bd73 100644 --- a/LibraryCPPTemplate/Tests/graph.cpp +++ b/LibraryCPPTemplate/Tests/graph.cpp @@ -141,7 +141,6 @@ int main() { } //////////Vertex removal check////////////////////////////////////////// - graph.add_Edge(0, 1, 10); graph.add_Edge(2, 3, 5); graph.add_Edge(0, 4, 1); diff --git a/LibraryCPPTemplate/graph.h b/LibraryCPPTemplate/graph.h index d4a9f0ac65..bd435ba791 100644 --- a/LibraryCPPTemplate/graph.h +++ b/LibraryCPPTemplate/graph.h @@ -26,6 +26,7 @@ class Graph { ~Graph() { for (size_t i = 0; i < edgeMatrix.size(); ++i) { delete edgeMatrix[i]; + edgeMatrix[i] = nullptr; } }