In C # and Java, each time a method is called, it is a new stack frame. Does that mean that from memory, these two methods are not the same, even if their contents are the same
When it comes to dependency injection, I used Singleton instead of Transient because I believe it is stateless for services and using singleton injection should result in higher performance. Moreover, methods are stored in the method area and every call will enter the stack frame. However, my colleague told me that this would affect performance, so I had some doubts.
wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.