Fix memory leak in DocumentRecentTabsManager
[chromium-blink-merge.git] / ios / web / alloc_with_zone_interceptor.h
blob00265405d748091e0c3ec64f9f42109e1502bddf
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
6 #define IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
8 #import <Foundation/Foundation.h>
10 namespace web {
11 // Adds |impl_block| as a custom implementation for |allocWithZone:| method of
12 // |target| Class. AddAllocWithZoneMethod can not swizzle existing
13 // |allocWithZone:| method of |target| Class. Neither |target| nor any of its
14 // superclases must not have overridden |allocWithZone:|.
15 void AddAllocWithZoneMethod(Class target, id (^impl_block)(Class, NSZone*));
16 } // namespace web
18 #endif // IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_