Ist es notwendig, zum abbestellen von observablen erstellt von Http-Methoden?

Müssen Sie die Abmeldung aus Winkel-2 http-Aufrufe zu verhindern, Speicherverlust?

 fetchFilm(index) {
        var sub = this._http.get(`http://example.com`)
            .map(result => result.json())
            .map(json => {
                dispatch(this.receiveFilm(json));
            })
            .subscribe(e=>sub.unsubscribe());
            ...
InformationsquelleAutor born2net | 2016-01-27
Schreibe einen Kommentar