我试图在数组中放入一些html标记以便稍后检索.我的编辑器在description1行上抛出语法错误,我无法弄清楚原因.任何帮助将非常感激.代码如下.谢谢
var modalcontent = {
description1 : '<div id = "description"><div class = "tbc">
<label class = "tbc" for = "tbc">Description</label>
</div>
<div class = "tbc">
<input type = "text" class = "tbc" name = "description" id = "tbc" placeholder = "Enter description">
</div>
</div>
<!--end description div-->'
}
Run Code Online (Sandbox Code Playgroud) 我最近升级到iOS10和Xcode 8,之后一些以前正在运行的代码现在不再有效了.当代码运行时,应用程序崩溃并在控制台中显示以下错误消息:
malloc:*对象0x1700bea80的错误:没有分配被释放的指针*在malloc_error_break中设置一个断点来调试
我已经做了一些测试,并将错误缩小到以下代码中的'createNativeAd'函数.
任何人都可以看到为什么会抛出这个错误?
//
// FacebookAdPlugin.m
// TestAdMobCombo
//
// Created by Xie Liming on 14-11-8.
//
//
#import <FBAudienceNetwork/FBAudienceNetwork.h>
#import "UITapGestureRecognizer+Spec.h"
#import "FacebookAdPlugin.h"
#define TEST_BANNER_ID @"726719434140206_777151452430337"
#define TEST_INERSTITIAL_ID @"726719434140206_777151589096990"
#define TEST_NATIVE_ID @"726719434140206_777151705763645"
#define OPT_DEVICE_HASH @"deviceHash"
@interface FacebookAdPlugin()<FBAdViewDelegate, FBInterstitialAdDelegate, FBNativeAdDelegate, UIGestureRecognizerDelegate>
@property (assign) FBAdSize adSize;
@property (nonatomic, retain) NSMutableDictionary* nativeads;
- (void) __removeNativeAd:(NSString*)adId;
- (void) fireNativeAdLoadEvent:(FBNativeAd*)nativeAd;
@end
// ------------------------------------------------------------------
@interface UITrackingView : UIView
@end
@implementation UITrackingView
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
// Always ignore the …Run Code Online (Sandbox Code Playgroud)