Skip to content

Commit

Permalink
Remove Glue Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakr233 committed Jul 4, 2024
1 parent 0ff21a6 commit 3c5612b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions Example/ColorfulApp/ColorfulAppApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import SwiftUI
struct ColorfulAppApp: App {
init() {
setenv("MTL_HUD_ENABLED", "1", 1)
DispatchQueue.global().async { leakTest() }
}

var body: some Scene {
Expand All @@ -26,17 +25,3 @@ struct ColorfulAppApp: App {
#endif
}
}

func leakTest() {
while true {
var view: AnimatedMulticolorGradientView?
DispatchQueue.main.asyncAndWait(execute: DispatchWorkItem {
view = AnimatedMulticolorGradientView(colorSpace: .lch)
})
usleep(500_000)
DispatchQueue.main.asyncAndWait(execute: DispatchWorkItem {
_ = view
})
view = nil
}
}
1 change: 0 additions & 1 deletion Example/ColorfulApp/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct ContentView: View {
colorSpace: colorSpace
)
.ignoresSafeArea()
.transition(.opacity)
}
.animation(.interactiveSpring, value: colorSpace.rawValue)
VStack {
Expand Down
1 change: 1 addition & 0 deletions Sources/ColorfulX/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public typealias ColorSpace = ColorVector.Space

extension ColorVector {
init(_ color: ColorElement, usingSpace space: Space = .rgb) {
print("color: \(color)")
let cgColor = color.cgColor
let color = cgColor.converted(
to: CGColorSpace(name: CGColorSpace.sRGB)!,
Expand Down

0 comments on commit 3c5612b

Please sign in to comment.