I'm a software developer, currently I'm working with front end technologies, like ReactJs and Angular, also I'm very interested in Rust and NodeJS.
Follow me on GitHub https://github.com/Jucian0
You are right, function will be compared base on reference, like an object.
But here I need to validate if the fn argument in the subscription and the fn argument in the unsubscription are located ate the same point of memory, if true, it means that is the same function.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You cant compare a function like that , function will be compared based on reference just like object
So it will return false even though is same
You are right, function will be compared base on reference, like an object.
But here I need to validate if the fn argument in the subscription and the fn argument in the unsubscription are located ate the same point of memory, if true, it means that is the same function.