added casts for deleting void*, this should cause destructors to be invoked now
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10149 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -164,7 +164,7 @@ scan_partition(int fd, partition_data *partition, void *cookie)
|
|||||||
partition_data *child = create_child_partition(partition->id,
|
partition_data *child = create_child_partition(partition->id,
|
||||||
i, -1);
|
i, -1);
|
||||||
if (!child) {
|
if (!child) {
|
||||||
PRINT(("Unable to create child at index %ld.\n", i));
|
PRINT(("Unable to create child at index %d.\n", i));
|
||||||
// something went wrong
|
// something went wrong
|
||||||
error = B_ERROR;
|
error = B_ERROR;
|
||||||
break;
|
break;
|
||||||
@@ -188,7 +188,7 @@ scan_partition(int fd, partition_data *partition, void *cookie)
|
|||||||
partition->content_cookie = NULL;
|
partition->content_cookie = NULL;
|
||||||
for (int32 i = 0; i < partition->child_count; i++) {
|
for (int32 i = 0; i < partition->child_count; i++) {
|
||||||
if (partition_data *child = get_child_partition(partition->id, i)) {
|
if (partition_data *child = get_child_partition(partition->id, i)) {
|
||||||
delete child->cookie;
|
delete static_cast<Session *>(child->cookie);
|
||||||
child->cookie = NULL;
|
child->cookie = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ free_identify_partition_cookie(partition_data */*partition*/, void *cookie)
|
|||||||
{
|
{
|
||||||
if (cookie) {
|
if (cookie) {
|
||||||
DEBUG_INIT_ETC(NULL, ("cookie: %p", cookie));
|
DEBUG_INIT_ETC(NULL, ("cookie: %p", cookie));
|
||||||
delete cookie;
|
delete static_cast<Disc*>(cookie);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ free_partition_cookie(partition_data *partition)
|
|||||||
{
|
{
|
||||||
if (partition && partition->cookie) {
|
if (partition && partition->cookie) {
|
||||||
DEBUG_INIT_ETC(NULL, ("partition->cookie: %p", partition->cookie));
|
DEBUG_INIT_ETC(NULL, ("partition->cookie: %p", partition->cookie));
|
||||||
delete partition->cookie;
|
delete static_cast<Session *>(partition->cookie);
|
||||||
partition->cookie = NULL;
|
partition->cookie = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ free_partition_content_cookie(partition_data *partition)
|
|||||||
{
|
{
|
||||||
if (partition && partition->content_cookie) {
|
if (partition && partition->content_cookie) {
|
||||||
DEBUG_INIT_ETC(NULL, ("partition->content_cookie: %p", partition->content_cookie));
|
DEBUG_INIT_ETC(NULL, ("partition->content_cookie: %p", partition->content_cookie));
|
||||||
delete partition->content_cookie;
|
delete static_cast<Disc*>(partition->content_cookie);
|
||||||
partition->content_cookie = NULL;
|
partition->content_cookie = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user