import UIKit

final class VConnect:ViewMain
{
    private weak var viewMain:View<ArchConnect>?
    
    required init(controller:UIViewController)
    {
        super.init(controller:controller)
        update()
    }
    
    required init?(coder:NSCoder)
    {
        return nil
    }
    
    //MARK: internal
    
    func update()
    {
        self.viewMain?.removeFromSuperview()
        
        guard
            
            let controller:CConnect = self.controller as? CConnect,
            let viewType:View<ArchConnect>.Type = controller.model.status?.viewType
            
        else
        {
            return
        }
        
        let viewMain:View<ArchConnect> = viewType.init(controller:controller)
        self.viewMain = viewMain
        
        addSubview(viewMain)
        
        NSLayoutConstraint.equals(
            view:viewMain,
            toView:self)
    }
}

import UIKit

final class VConnect:ViewMain
{
    required init(controller:UIViewController)
    {
        super.init(controller:controller)
        update()
    }
    
    required init?(coder:NSCoder)
    {
        return nil
    }
    
    //MARK: internal
    
    func update()
    {
        guard
            
            let controller:CConnect = self.controller as? CConnect,
            let viewType:View<ArchConnect>.Type = controller.model.status?.viewType
            
        else
        {
            return
        }
        
        let view:View<ArchConnect> = viewType.init(controller:controller)
        
        addSubview(view)
        
        NSLayoutConstraint.equals(
            view:view,
            toView:self)
    }
}

--- 
+++ 
@@ -2,6 +2,8 @@
 
 final class VConnect:ViewMain
 {
+    private weak var viewMain:View<ArchConnect>?
+    
     required init(controller:UIViewController)
     {
         super.init(controller:controller)
@@ -17,6 +19,8 @@
     
     func update()
     {
+        self.viewMain?.removeFromSuperview()
+        
         guard
             
             let controller:CConnect = self.controller as? CConnect,
@@ -27,12 +31,13 @@
             return
         }
         
-        let view:View<ArchConnect> = viewType.init(controller:controller)
+        let viewMain:View<ArchConnect> = viewType.init(controller:controller)
+        self.viewMain = viewMain
         
-        addSubview(view)
+        addSubview(viewMain)
         
         NSLayoutConstraint.equals(
-            view:view,
+            view:viewMain,
             toView:self)
     }
 }
Add a property for view main
