I'm profiling the following code's memory usage using the Timeline in Chrome Dev Tools v27.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
<title>RAF</title>
</head>
<body>
<script type='text/javascript' charset='utf-8'>
var frame = function() {
window.webkitRequestAnimationFrame(frame);
};
window.webkitRequestAnimationFrame(frame);
</script>
</body>
</html>
Notice it's simple. But eventually I see the a tooth pattern appear that indicates the garbage collector is reclaiming memory.
Does raf create garbage objects by default? Is there any way to avoid this? Thx.