These are chat archives for canjs/canjs

3rd
Apr 2017
Szabolcs Schmidt
@sszabolcs
Apr 03 2017 06:50
@justinbmeyer Thanks, I'll check it!
Szabolcs Schmidt
@sszabolcs
Apr 03 2017 10:19
blob

Hi!

I think I've found a memory leak.
Here is a JSBin

To reproduce the leak:

  1. Take a heap snapshot
  2. Click on Insert
  3. Click on Remove
  4. Take a heap snapshot
  5. Click on Insert
  6. Click on Remove
  7. Take a heap snapshot

Now view the list of objects created between the first and the second snapshot. You'll see that there are items which cannot be garbage collected (see image above).

Szabolcs Schmidt
@sszabolcs
Apr 03 2017 13:16
Sorry, wrong JSBin included, here is the right one: JS Bin
Chasen Le Hara
@chasenlehara
Apr 03 2017 16:54
Hi @sszabolcs, would you mind filing an issue (if you haven’t already) please?
Also, I wonder if that JS Bin could be simplified any more, maybe by not using can.Model
Last thing: the JS Bin includes a custom version of CanJS, so we’ll need to know a specific version and browser.
I know our team ran into this recently so I’m wondering if you’re seeing this in Chrome 57 but not earlier versions: jquery/jquery#3603
Christopher Baker
@christopherjbaker
Apr 03 2017 19:07
I understand what {{func1(@func2)}} should do (execute func1, passing func2 directly), but what would be the expected output of {{@func2}}?
Matthew Phillips
@matthewp
Apr 03 2017 19:15
whatever @func2 is
if its a function, then the function
so I guess fn.toString()
Christopher Baker
@christopherjbaker
Apr 03 2017 19:18
Currently, it executes the function, then prints nothing
Matthew Phillips
@matthewp
Apr 03 2017 19:25
that seems wrong to me
Szabolcs Schmidt
@sszabolcs
Apr 03 2017 21:19

@chasenlehara In which project should I file the bug (canjs, can-view-live)?

I'm using can.Model because this code is part of a large app which was written with CanJS 2. I'm now trying to migrate to CanJS 3 but not planning to migrate all those 'old' Model codes if it is feasible.

Ok, I'll write those version numbers (custom CanJS build component version numbers and browser version) in the bug description.