Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: utils/archive/reader.c

Issue 10825139: Free the C memory for ArchiveInputStream when the stream is garbage collected. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix a renamed function Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "messaging.h" 5 #include "messaging.h"
6 #include "reader.h" 6 #include "reader.h"
7 7
8 void archiveReadNew(Dart_Port p) { 8 void archiveReadNew(Dart_Port p) {
9 struct archive* a = archive_read_new(); 9 struct archive* a = archive_read_new();
10 DART_INT64(result, (intptr_t) a) 10 DART_INT64(result, (intptr_t) a)
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 // TODO(nweiz): wrap archive_read_into_fd when issue 4160 is fixed 336 // TODO(nweiz): wrap archive_read_into_fd when issue 4160 is fixed
337 // TODO(nweiz): wrap archive_read_extract and friends 337 // TODO(nweiz): wrap archive_read_extract and friends
338 338
339 void archiveReadClose(Dart_Port p, struct archive* a) { 339 void archiveReadClose(Dart_Port p, struct archive* a) {
340 checkResult(p, a, archive_read_close(a)); 340 checkResult(p, a, archive_read_close(a));
341 } 341 }
342 342
343 void archiveReadFree(Dart_Port p, struct archive* a) { 343 void archiveReadFree(Dart_Port p, struct archive* a) {
344 // TODO(nweiz): Should we attach a finalizer to the Dart object that calls
345 // this automatically?
346 checkResult(p, a, archive_read_free(a)); 344 checkResult(p, a, archive_read_free(a));
347 } 345 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698