Skip to content

Commit f7d889f

Browse files
authored
Merge pull request #101 from lmichaudel/patch-1
cleanupSwapChain in 17_swap_chain_recreation.cpp was not destroying the previous swapchain
2 parents 3d5207c + 991be1d commit f7d889f

19 files changed

+21
-2
lines changed

attachments/17_swap_chain_recreation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ class HelloTriangleApplication {
124124

125125
void cleanupSwapChain() {
126126
swapChainImageViews.clear();
127+
swapChain = nullptr;
127128
}
128129

129130
void cleanup() {

attachments/18_vertex_input.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ class HelloTriangleApplication {
148148

149149
void cleanupSwapChain() {
150150
swapChainImageViews.clear();
151+
swapChain = nullptr;
151152
}
152153

153154
void cleanup() {

attachments/19_vertex_buffer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class HelloTriangleApplication {
152152

153153
void cleanupSwapChain() {
154154
swapChainImageViews.clear();
155+
swapChain = nullptr;
155156
}
156157

157158
void cleanup() {

attachments/20_staging_buffer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class HelloTriangleApplication {
152152

153153
void cleanupSwapChain() {
154154
swapChainImageViews.clear();
155+
swapChain = nullptr;
155156
}
156157

157158
void cleanup() {

attachments/21_index_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class HelloTriangleApplication {
160160

161161
void cleanupSwapChain() {
162162
swapChainImageViews.clear();
163-
swapChainImageViews.clear();
163+
swapChain = nullptr;
164164
}
165165

166166
void cleanup() {

attachments/22_descriptor_layout.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class HelloTriangleApplication {
177177

178178
void cleanupSwapChain() {
179179
swapChainImageViews.clear();
180+
swapChain = nullptr;
180181
}
181182

182183
void cleanup() {

attachments/23_descriptor_sets.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class HelloTriangleApplication {
182182

183183
void cleanupSwapChain() {
184184
swapChainImageViews.clear();
185+
swapChain = nullptr;
185186
}
186187

187188
void cleanup() {

attachments/24_texture_image.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ class HelloTriangleApplication {
189189

190190
void cleanupSwapChain() {
191191
swapChainImageViews.clear();
192+
swapChain = nullptr;
192193
}
193194

194195
void cleanup() {

attachments/25_sampler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ class HelloTriangleApplication {
193193

194194
void cleanupSwapChain() {
195195
swapChainImageViews.clear();
196+
swapChain = nullptr;
196197
}
197198

198199
void cleanup() {

attachments/26_texture_mapping.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class HelloTriangleApplication {
195195

196196
void cleanupSwapChain() {
197197
swapChainImageViews.clear();
198+
swapChain = nullptr;
198199
}
199200

200201
void cleanup() {

0 commit comments

Comments
 (0)