Hello,

I have a view called Cave_V,
When I press a button, it creates the view and then I have a button in this view to close it. I want to destroy it for memory usage, but I need to create again later.

Problem
Then I Create again, the controller doesn't work, I don't understand why.

Here is the controller
Code:
Ext.define('Cave.controller.Main_C', {
    extend: 'Ext.app.Controller',


    config: {
        refs: {
            ajouterButton: "#Ajouter",
            fermerCaveBut: "#fermerCaveB",
            CaveV: "#Cave1",
            Casier:"#Casier1",
        },
        control: {
             ajouterButton: {
                         tap: 'afficheCave'
            },
        fermerCaveBut: {
                         tap: 'fermerCave'
            },
        },
    },


    afficheCave: function() {
       // instanciation de la cave
        var maCave= Ext.create('Cave.view.Cave_V');
        maCave.afficher();
        monCasier=this.getCasier();
        monCasier.remplir();
    },
    fermerCave: function() {
        var maCave=this.getCaveV();
        maCave.fermer();
        console.log("fermer");
    }
});
Here are the two function called :

afficher:function(){

Ext.Viewport.add(this);
this.show();
},
fermer:function(){
this.destroy();
}
What is wrong ?