AOSSIE-Org / AOSSIE-Org/Resonate-Website

Bug: GSAP timeline instances not cleaned up in useEffect memory leak in page.jsx

Đang mở
#307 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
43
Fork
154
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 🐛 Describe the bug

**Description:**
```
In `app/page.jsx`, four GSAP timelines are created inside `useEffect`
but never killed in the cleanup function:

- `heroTl` (line 45)
- `techStackTl` (line 109)
- `aboutTl` (line 142)
- `downloadTl` (line 181)

The current cleanup only calls:
- `lenis.destroy()`
- `ScrollTrigger.getAll().forEach(t => t.kill())`

GSAP timelines hold references to DOM elements and tween objects
independently of ScrollTrigger. Without calling `.kill()`, these
accumulate on every remount causing a memory leak.

## Steps to Reproduce
1. Open app/page.jsx
2. Check the useEffect cleanup block (line 213)
3. Notice heroTl, techStackTl, aboutTl, downloadTl are never killed

## Proposed Fix
Add to the cleanup return block:
heroTl.kill();
techStackTl.kill();
aboutTl.kill();
downloadTl.kill();

Image

Image

## References
Related to #292 (Animation Lifecycle & Memory Safety Audit)

I'd like to work on this issue.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.