Can't remove event listening

Hi! I’m currently working on a simple project, and as part of it, I needed to register player input.
So I added event listener, so whenever player presses inside parent node, other stuff happens.

onLoad() {
    this.node.parent.on(cc.Node.EventType.TOUCH_START, function (event) {
        this.Pressed = true;
        console.log("Pressed");
    }, this);        
    this.node.parent.on(cc.Node.EventType.TOUCH_END, function (event) {
        this.Pressed = false;
        console.log("Lifted");
    }, this);
}

And then way dowm the code I tried removing those, but it doesn’t seem to work

...
 this.node.parent.off(cc.Node.EventType.TOUCH_START, function (event) {
     this.Pressed = true;
     console.log("Pressed");
 }, this);
 this.node.parent.off(cc.Node.EventType.TOUCH_END, function (event) {
     this.Pressed = false;
     console.log("Lifted");
 }, this);
...

Code certainly does reach those commands, as other methods there seem to work, but nor .off(), nor even .destroy() called on this.node don’t remove the listeners.
Really need help with that as there should be many objects with that script and I really don’t want to pile up event listeners.
Also, probably important, I use cocos 2.4.10 + TS and don’t intend to switch version of this project

You are defining separate functions to register and unregister the events, you need to use the same function, try this

onLoad() {
    this.node.parent.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);        
    this.node.parent.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
}

onTouchStart(event) {
     this.Pressed = true;
     console.log("Pressed");
}

onTouchEnd(event) {
    this.Pressed = false;
    console.log("Lifted");
}

to remove

 this.node.parent.off(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
 this.node.parent.off(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);

OR
to remove all listeners of this type

 this.node.parent.off(cc.Node.EventType.TOUCH_START);
 this.node.parent.off(cc.Node.EventType.TOUCH_END);

Thanks! Somehow I didn’t think cocos would treat them as different functions, as they do same thing with the same syntax, but I guess it only watches function’s name/type/etc.
Anyways, thanks again!