add support for weak refs, static reference tracking for caf handling