This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
clone and Stale Reference
scil edited this page Jul 25, 2018
·
4 revisions
clone
creates new objects. Give an object X1, and another object Y holding a ref to X1, in a new request X1 is cloned to produce a new object X2, but object Y is still holding X1, not X2. So developers and users should pay some attention to this kind of relations.
The second problem is that by default clone
does not clone props of type closure or object.
The third problem is that clone maybe sometimes destroy the method rebinding
in Laravel container.
Objects url and routes have ref in Laravel offical objects , but rarely have ref in your code. So clone
is used. While other objects, such as event, are used widely in your code, so clone
is not used, trait Dict
is used.
- Start
- Coding Guideline
- Deploy and OS Configuration
- New API
- Design
- Dev about Mode Map
- Dev about Mode Backup