* Use ref counting to determine when to unload a replicants add_on image, fixes #2712.

* Don't delete fStream if we don't own it, would crash ShelfTest on quit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29439 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner
2009-03-08 14:18:06 +00:00
parent 2c9d779293
commit 37a89eb4e9
2 changed files with 58 additions and 29 deletions
+10 -2
View File
@@ -1,14 +1,18 @@
/*
* Copyright 2001-2007, Haiku Inc.
* Copyright 2001-2009, Haiku Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _SHELF_H
#define _SHELF_H
#include <Dragger.h>
#include <Handler.h>
#include <List.h>
#include <Locker.h>
#include <String.h>
#include <map>
#include <utility>
class BDataIO;
class BPoint;
@@ -123,6 +127,10 @@ class BShelf : public BHandler {
bool fAllowZombies;
bool fTypeEnforced;
typedef std::map<BString, std::pair<image_id, int32> > LoadedImageMap;
static LoadedImageMap sLoadedImages;
static BLocker sLoadedImageMapLocker;
uint32 _reserved[8];
};