Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
Files
Commits
8d1eba09
Commit
8d1eba09
authored
Jan 19, 2000
by
John Sullivan
Browse files
Ref and destroy file infos correctly.
parent
edb4ab4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog-20000414
View file @
8d1eba09
2000-01-19 John Sullivan <sullivan@eazel.com>
* src/file-manager/fm-directory-view.c:
Added #include <libgnomevfs/gnome-vfs-file-info.h>
(fm_directory_view_populate), (display_pending_entries):
Bump refcount on file info before adding it to directory.
(fm_directory_view_load_uri): Destroy directory list
before setting it to NULL. With previous change, this
should prevent leaking GnomeVFSFileInfos and their
lists.
2000-01-19 Darin Adler <darin@eazel.com>
* libnautilus/nautilus-directory.c: (nautilus_directory_finalize):
...
...
src/file-manager/fm-directory-view.c
View file @
8d1eba09
...
...
@@ -33,6 +33,7 @@
#include
<libgnome/gnome-i18n.h>
#include
<libgnomevfs/gnome-vfs-async-ops.h>
#include
<libgnomevfs/gnome-vfs-directory-list.h>
#include
<libgnomevfs/gnome-vfs-file-info.h>
#include
<libgnomevfs/gnome-vfs-uri.h>
#include
<libgnomevfs/gnome-vfs-utils.h>
#include
<libnautilus/nautilus-gtk-macros.h>
...
...
@@ -344,6 +345,7 @@ fm_directory_view_populate (FMDirectoryView *view)
info
=
gnome_vfs_directory_list_get
(
view
->
details
->
directory_list
,
position
);
gnome_vfs_file_info_ref
(
info
);
fm_directory_view_add_entry
(
view
,
info
);
position
=
gnome_vfs_directory_list_position_next
...
...
@@ -366,6 +368,7 @@ display_pending_entries (FMDirectoryView *view)
info
=
gnome_vfs_directory_list_get
(
view
->
details
->
directory_list
,
view
->
details
->
current_position
);
gnome_vfs_file_info_ref
(
info
);
fm_directory_view_add_entry
(
view
,
info
);
view
->
details
->
current_position
=
gnome_vfs_directory_list_position_next
...
...
@@ -692,7 +695,8 @@ fm_directory_view_load_uri (FMDirectoryView *view,
gnome_vfs_uri_unref
(
view
->
details
->
uri
);
view
->
details
->
uri
=
gnome_vfs_uri_new
(
uri
);
/* FIXME: Does this leak? Where are we supposed to destroy the old value? */
if
(
view
->
details
->
directory_list
!=
NULL
)
gnome_vfs_directory_list_destroy
(
view
->
details
->
directory_list
);
view
->
details
->
directory_list
=
NULL
;
view
->
details
->
current_position
=
GNOME_VFS_DIRECTORY_LIST_POSITION_NONE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment