Changeset 20 in Main


Ignore:
Timestamp:
26/11/2011 09:39:34 (18 months ago)
Author:
duggan
Message:

Clean up topology data on app destruction. Fixes #15

Location:
src/fake_app_server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/fake_app_server/App.cpp

    r18 r20  
    1414                status = B_ERROR; 
    1515        } 
     16        SlotsUsed = 0; 
    1617        // TODO: create framebuffers and windows to display them 
    1718        // TODO: set up whatever other threads / systems 
     
    3940                                continue; 
    4041                        } 
     42                        SlotsUsed++; 
    4143                        line = rawline; 
    4244                        BString temp; 
     
    114116} 
    115117 
     118App::~App() 
     119{ 
     120        for (int a = 0; a < SlotsUsed; a++) 
     121        { 
     122                for (int b = 0; b < Devices[a].HeadCount; b++) 
     123                { 
     124                        delete Devices[a].Heads[b].Resolutions; 
     125                } 
     126                delete Devices[a].Heads; 
     127        } 
     128} 
     129 
    116130status_t 
    117131App::Status() 
  • src/fake_app_server/App.h

    r18 r20  
    4848class App : public BApplication { 
    4949public: 
    50         App(void); 
     50        App(); 
     51        ~App(); 
    5152        status_t        Status(); 
    5253 
     
    5556        Device Devices[MAX_SLOTS]; 
    5657        status_t        status; 
     58        uint32          SlotsUsed; 
    5759}; 
    5860 
Note: See TracChangeset for help on using the changeset viewer.