I have more than ten views in a struct, the compiler calls the issue, then I'm use group to fix the problem. if I group more the twenty views, it will cause a memory leak?
VStack {
Text("Congratulations")
.font(.largeTitle)
.fontWeight(.bold)
Spacer()
// This grouping solved the problem
Group {
Text("You mastered a maze with 6 rooms!")
Text("You found all the 3 hidden items")
}
Spacer()
Text("Your Progress")
.font(.largeTitle)
.fontWeight(.bold)
GameProgressView(gameProgress: gameProgress)
Spacer()
Text("You can now enter Level 4")
.multilineTextAlignment(.center)
Spacer()
RHButton(title: "OK", action: { print("OK pressed") })
}