Any way to dispose of a live graph?

40 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Jeremy Kross

belum dibaca,
10 Jul 2015, 21.53.5510/07/15
kepadazelko...@googlegroups.com
So I'm running a little game on Zelkova.  I have a character select screen and an actual game mode.  After the user selects a character, I need to clean up all the graphs I spawned so they're not eating up memory and compute cycles during the game.  Sorry if this should be apparent, but does anyone out there know the best way to do this?

James MacAulay

belum dibaca,
11 Jul 2015, 10.32.5611/07/15
kepadazelko...@googlegroups.com, jeremy...@gmail.com
Have you tried calling `cljs.core.async/close!` on the live graphs? I think this should make all the goroutines bail out, release the right event listeners, and free things up for GC. Of course you also need to make sure you don't have any other references to the live graph lying around. If this doesn't work, then it's a bug that I need to fix.

-James

James MacAulay

belum dibaca,
11 Jul 2015, 10.42.3511/07/15
kepadazelko...@googlegroups.com, jmac...@gmail.com, jeremy...@gmail.com
Ah, I realize now that unfortunately close!-ing live graphs will lead you into another bug:


Sorry about this, I need to do some spelunking to see where channels are not being closed properly.

Jeremy Kross

belum dibaca,
11 Jul 2015, 21.02.5411/07/15
kepadazelko...@googlegroups.com, jeremy...@gmail.com
Oh, thanks James.  Good to know that's the intended functionality.  Many thanks for a wonderful library. 
Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru