AnimTrap icon indicating copy to clipboard operation
AnimTrap copied to clipboard

Unlimited Rain drops are being created

Open kasvith opened this issue 7 years ago • 8 comments

Memory Management Bug

By looking at the code it can be guessed that unlimited amount of div elements will be created and after the usage they are not been destroyed. It can lead to memory errors of the user computer.

It need to be fixed ASAP

kasvith avatar Feb 22 '18 18:02 kasvith

Workaround

One possible solution is to make rain drops disappear from the array itself after hitting the bottom of screen.

This can be done via an event, if this is possible i suggest you to stop creating new rain drops but use instead ones already in list to gain perfomance

kasvith avatar Feb 22 '18 18:02 kasvith

yeah.I'll admit that a lot of div tags is getting up here. I am going to be removed now.

sanjayaharshana avatar Feb 22 '18 18:02 sanjayaharshana

What about the workaround i mentioned?

kasvith avatar Feb 22 '18 18:02 kasvith

So what i mention is to render the div differently wrapped with an event

For example look at this

kasvith avatar Feb 22 '18 18:02 kasvith

We used to try to reduce javascript frequently some animation effect. so I will remove demo page rain effect and this code too.

sanjayaharshana avatar Feb 22 '18 18:02 sanjayaharshana

Well we need JS for create this, i suppose there is a CSS way for this. But it wont be supported by all browsers

Look at this

kasvith avatar Feb 22 '18 18:02 kasvith

yeaah..that's a cool idea.

sanjayaharshana avatar Feb 22 '18 18:02 sanjayaharshana

Issue is still there

kasvith avatar Feb 26 '18 04:02 kasvith